我的网络里有两台电脑。我希望PC1有ssh访问PC2的权限。在PC2上,我安装了ssh-server。在PC2 inet addr:192.168.0.100 .接下来,我在PC1上执行以下命令:ssh root@192.168.0.100和get error:Connection timeout。我用的是Ubuntu 15.04
为什么?我需要为我的任务配置什么?
UPD:
sudo netstat -tulpen | grep ":22"
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 75804 8281/sshd
tcp6 0 0 :::22 :::* LISTEN 0 75806 8281/sshd
udp6 0 0 :::22918 :::* 0 65985 6596/dhclient UPD2:
root@v400:/ # ssh -vv ivan@192.168.0.100
OpenSSH_6.4, OpenSSL 1.0.1j 15 Oct 2014
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.100 [192.168.0.100] port 22.
debug1: connect to address 192.168.0.100 port 22: Connection timed out
ssh: connect to host 192.168.0.100 port 22: Connection timed out
root@v400:/ # nc 192.168.0.100 22
Failed to connect nc 192.168.0.100:22发布于 2015-08-20 08:32:17
正如评论中提到的,禁用ufw。默认情况下,简单的防火墙(ufw)也会阻塞ssh连接。
https://stackoverflow.com/questions/32111971
复制相似问题