Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
设置SSH以便在无密码的情况下自动登录_Ssh_Sshd - Fatal编程技术网

设置SSH以便在无密码的情况下自动登录

设置SSH以便在无密码的情况下自动登录,ssh,sshd,Ssh,Sshd,我有两台电脑,分别叫120和110。我正在尝试在110到120之间配置一个没有密码的ssh连接。这就是我在120中所做的: 1- ssh-keygen -t rsa 2- scp ~/.ssh/id_rsa.pub root@110:.ssh/authorized_keys 然后在110中: 1- chmod 700 ~/.ssh/authorized_keys 此步骤不起作用,因为它不断询问密码。所以,我试着做相反的事情,从120到110,做完全相同的事情。 我还更改了两台计算机的/etc

我有两台电脑,分别叫120和110。我正在尝试在110到120之间配置一个没有密码的ssh连接。这就是我在120中所做的:

1- ssh-keygen -t rsa
2- scp ~/.ssh/id_rsa.pub root@110:.ssh/authorized_keys
然后在110中:

1- chmod 700 ~/.ssh/authorized_keys
此步骤不起作用,因为它不断询问密码。所以,我试着做相反的事情,从120到110,做完全相同的事情。 我还更改了两台计算机的
/etc/ssh/sshd\u config
文件中的
permitrotlogin yes

我没有主意了。有什么建议吗

编辑:

这是我使用ssh-vv得到的结果:

debug2: we did not send a packet, disable method
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /root/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Trying private key: /root/.ssh/id_ed25519
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
root@192.168.1.120's password: 
尝试运行此操作(生成密钥后):

ssh-add