【转】fedora和ubuntu开启ssh
fedora和ubuntu开启ssh
1小时前
ubuntu开启SSH服务
SSH分客户端openssh-client和openssh-server如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-get install openssh-client),如果要使本机开放SSH服务就需要安装openssh-serversudo apt-get install openssh-server然后确认sshserver是否启动了:ps -e |grep ssh如果看到sshd那说明ssh-server已经启动了。如果没有则可以这样启动:sudo /etc/init.d/ssh startssh-server配置文件位于/ etc/ssh/sshd_config,在这里可以定义SSH的服务端口,默认端口是22,你可以自己定义成其他端口号,如222。然后重启SSH服务:sudo /etc/init.d/ssh stopsudo /etc/init.d/ssh start然后使用以下方式登陆SSH:ssh tuns@192.168.0.100 tuns为192.168.0.100机器上的用户,需要输入密码。断开连接:exit
Fedora开启SSH服务
1) 安装openssh-server
[root@localhost ~]# yum install openssh-server
2) 查看是否已成功安装openssh-server
[root@localhost ~]# rpm -qa | grep openssh-server
openssh-server-5.3p1-19.fc12.i686
[root@localhost ~]#
3) 修改ssh服务的配置文件
配置ssh服务的运行参数, 是通过修改配置文件/etc/ssh/ssh_config实现的. /etc/ssh/ssh_config文件的配置选项非常多, 但大部分都已经用"#"注释掉了.
#Port 22
#Protocol 2,1
#PermitRootLogin yes
配置完保存配置文件, 不过如果没什么特殊的要求这都不用配置.
4) 重启SSH服务
[root@localhost ~]# /etc/rc.d/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
5) 如果开启了防火墙, 我们需要允许TCP协议的22端口通过.
[root@localhost ~]# iptables -I INPUT -p tcp --dport 22 -j ACCEPT
6) 如果想让ssh服务开机就运行, 需要使用# ntsysv命令打开开机服务选项卡. 选中sshd后按"OK".
[root@localhost ~]# ntsysv
7) 到这里所有工作都完成了, 可以尝试从客户端SSH登陆Fedora. 我用的是PUTTY, 一款非常好用的软件, 支持Telnet, SSH.
【转】fedora和ubuntu开启ssh的更多相关文章
- ubuntu开启SSH服务远程登录
http://blog.csdn.net/jackghq/article/details/54974141 ubuntu开启SSH服务远程登录
- 让ubuntu开启ssh服务以及让vi/vim正常使用方向键与退格键
VIM 修复方法: 安装vim full版本,在full版本下键盘正常,安装好后同样使用vi命令.ubuntu预装的是vim tiny版本,而需要的是vim full版本.执行下面的语句安装vim f ...
- 如何在ubuntu开启ssh服务-使 SecureCRT远程登录
不少人在第一次使用ubuntu系统的时候,用了很多种方法均没有办法开启SSH服务,ubuntu和其它的linux系统有所区别,因为在ubuntu下,service sshd restart 之类 ...
- Ubuntu 开启SSH服务以及有关设置:安装,指定端口号、免密登录、远程拷贝
本文所用系统为 Ubuntu 18.04 什么是SSH? 简单说,SSH是一种网络协议,用于计算机之间的加密登录.全名为:安全外壳协议.为Secure Shell的缩写.SSH为建立在应用 ...
- Ubuntu开启SSH端口并且搭建Vulhub环境
1.下载好ubuntu.开启SSH: * sudo apt update * sudo apt install openssh-server * sudo systemctl status ssh 用 ...
- Ubuntu 开启SSH 以及LAMP环境安装
1. 更新 apt-get sudo apt-get update 2.安装 openssh sudo apt-get install openssh-server 3.设置root账号密码 sudo ...
- ubuntu开启SSH服务
SSH分客户端openssh-client和openssh-server 如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-g ...
- [转] ubuntu开启SSH服务
点击阅读原文 SSH分客户端openssh-client和openssh-server如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo ...
- Ubuntu 开启ssh
sudo apt-get install openssh-server Ubuntu缺省安装了openssh-client,所以在这里就不安装了,如果你的系统没有安装的话,再用apt-get安装上即可 ...
随机推荐
- 【计算机网络】DNS的作用以及修改DNS的方法
1.DNS的作用及修改DNS的方法 1.1.DNS的作用 DNS就是将域名映射成ip的分布式数据库服务器,它的作用如下图: 1.2.修改DNS的方法 常用的DNS服务器 1.114.114.114.1 ...
- 微信小程序开发 给微信发送模板消息提示openId无效
参数我都给好了,也是post的raw方式发送请求, openId是绝对没有问题的. 但就是一直报如下错误 {"errcode":40003,"errmsg":& ...
- Python编程快速上手--实践项目11.11.1
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time def messa ...
- ERROR! The server quit without updating PID file (/usr/local/var/mysql/bogon.pid).
本文转载自http://www.jb51.net/article/48625.htm 今天网站web页面提交内容到数据库,发现出错了,一直提交不了,数找了下原因,发现数据写不进去!第一反应,重启mys ...
- The North American Invitational Programming Contest 2018 H. Recovery
Consider an n \times mn×m matrix of ones and zeros. For example, this 4 \times 44×4: \displaystyle \ ...
- python中strip(),lstrip(),rstrip()函数的讲解
1. strip() 它的函数原型:string.strip(s[, chars]),它返回的是字符串的副本,并删除前导和后缀字符.(意思就是你想去掉字符串里面的哪些字符,那么你就把这些字符当参数传入 ...
- BZOJ 2295: [POJ Challenge]我爱你啊
由于是子序列,那么难度就在于读入 #include<cstdio> #include<algorithm> #include<cstring> using name ...
- Mysql 学习目录
Mysql 目录 Mysql之路[第一篇]:Mysql基础 Mysql之路[第二篇]:Mysql 常用命令 Mysql之路[第三篇]:Python对Mysql的操作 Mysql之路[第四篇]:ORM ...
- Java-字符串大小写转换
package com.tj; public class MyClass implements Cloneable { public static void main(String[] args) { ...
- 【02】markdown工具推荐
[02]信息 Windows 平台 MarkdownPad MarkPad Linux 平台 ReText Mac 平台 Mou 最新版Mac OS下Mou已经无法使用了.这里推荐一个跨平台的编辑器 ...