ssh connect to host port : Connection refused
问题:ssh请求被拒绝
pruce@~$ ssh pruce@10.60.100.172
ssh: connect to host 10.60.100.172 port 22: Connection refused
解决一:
#查看ssh是否正常安装
pruce1@~$ ps -ef|grep ssh
pruce1 3826 3743 0 11:56 pts/1 00:00:00 grep --color=auto ssh
新Ubuntu没有安装openssh-server
#安装服务
sudo apt-get install openssh-server
pruce1@~$ ps -ef|grep ssh
root 3589 1 0 11:51 ? 00:00:00 /usr/sbin/sshd -D
root 3678 3589 0 11:52 ? 00:00:00 sshd: pruce1 [priv]
pruce1 3742 3678 0 11:52 ? 00:00:00 sshd: pruce1@pts/1
pruce1 3826 3743 0 11:56 pts/1 00:00:00 grep --color=auto ssh
ssh链接正常,OK。
还有可能是禁止root用户登录SSH,还有就是限制某些IP登录SSH