如何开启Ubuntu SSH远程登录

[color=red]不同版本的ubuntussh设置不太一样[/color]

ubuntu 14.04 设置如下:
[url]http://jingyan.baidu.com/article/9c69d48fb9fd7b13c8024e6b.html[/url]

1 sudo apt-get update
2 sudo apt-get install openssh-server
3 打开"终端窗口",输入"sudo ps -e |grep ssh"-->回车-->有sshd,说明ssh服务已经启动,如果没有启动,输入"sudo service ssh start"-->回车-->ssh服务就会启动。
4 打开"终端窗口",输入"sudo gedit /etc/ssh/sshd_config"-->回车-->把配置文件中的"PermitRootLogin without-password"加一个"#"号,把它注释掉-->再增加一句"PermitRootLogin yes"-->保存,修改成功。


旧版本ubuntu 如下:
1 开始root账号
[color=red] sudo passwd root[/color]

2 安装SSH服务
[color=red] sudo apt-get install openssh-server[/color]


3 修改SSH配置文件(ssh-server配置文件位于/ etc/ssh/sshd_config)
[color=red]
a) sudo chmod 777 /etc/ssh/sshd_config //设置为可读可写
b)获取root权限 sudo -i
c) 修改配置文件 vi /etc/ssh/sshd_config & /etc/ssh/ssh_config
or sudo gedit /etc/ssh/sshd_config & /etc/ssh/ssh_config
[/color]
[color=red]
将下面几行注释行注释去掉:
  #GSSAPIAuthentication yes
#GSSAPIDelegateCredentials no
#RSAAuthentication no
#Port 22
[/color]

4 重启SSH服务
[color=red] sudo /etc/init.d/ssh restart

sudo service ssh restart
[/color]

5检查端口 ps -e | grep ssh

6 利用Putty或则WinSCP可以进行SSH登录了
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值