如何在局域网上从一台电脑SSH到另一台电脑

我有一个局域网上的两个电脑。 我可以使用ssh从一个连接到另一个,但不能以其他方式连接。 我明白了

ssh -vv 192.168.1.2 OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to 192.168.1.2 [192.168.1.2] port 22. debug1: connect to address 192.168.1.2 port 22: Connection refused 

ssh:连接到主机192.168.1.2端口22:连接被拒绝

您必须在要连接的计算机上安装openssh-server。 如果192.168.1.2也是Debian或Ubuntu,可以这样做:aptitude install openssh-server(你必须是root用户,或者:sudo aptitude install openssh-server,如果你使用没有root帐户的ubuntu )。 如果您在192.168.1.2上使用防火墙,请打开端口22。

然后再试一次。

在192.168.1.2上安装open-ssh。 打开22端口,如果closures。

什么tdeutsch说的+

请记住检查/etc/hosts.{allow,deny}文件。