xshell5 远程连接ubuntu

xiaoxiao2021-02-28  123

本人使用的ubuntu版本为ubuntu-16.04-desktop-amd64 第一步: 查看ubuntu的ip地址 handalei@ubuntu:~$ ifconfig 打开xshell使用此ip远程连接到ubuntu,此时连接失败 第二步:安装openssh-server handalei@ubuntu:~$ sudo apt-get install openssh-server 第三步:查看ssh-agent是否启动 handalei@ubuntu:~$ ps -e | grep ssh 显示结果: 35640 ? 00:00:00 sshd 看到 sshd 表示ssh-agent已经启动,否则: 第四步:handalei@ubuntu:~$ /etc/init.d/ssh start 显示结果: [ ok ] Starting ssh (via systemctl): ssh.service. 第五步:xshell默认端口为22,想要连接成功,还需要关闭ubuntu的防火墙 handalei@ubuntu:~$ sudo iptables -I INPUT -p TCP --dport 22 -j ACCEPT 第六步:打开xhell就可以成功远程连接到ubuntu了
转载请注明原文地址: https://www.6miu.com/read-800172.html

最新回复(0)