我在机器A上有一对epadmin的密钥。我通过文件夹中的scp
将它们复制到epadmin主文件夹中的机器B上.ssh
访问命令:ssh epadmin@10.2.11.13
[epadmin@3A1D .ssh]$ ls -la
total 24
drwxrwxr-x 2 epadmin epadmin 4096 May 12 14:41 .
drwx------ 6 epadmin epadmin 4096 May 12 14:40 ..
-rw-r--r-- 1 epadmin epadmin 438 May 12 14:41 config
-rw------- 1 epadmin epadmin 1671 May 12 14:41 id_rsa_auto_epmc
-rw-r--r-- 1 epadmin epadmin 407 May 12 14:41 id_rsa_auto_epmc.pub
-rw-r--r-- 1 epadmin epadmin 2818 May 12 14:41 known_hosts
这是一段-vvv(详细)日志
debug1: Next authentication method: publickey
debug1: Trying private key: /home/epadmin/.ssh/identity
debug3: no such identity: /home/epadmin/.ssh/identity
debug1: Trying private key: /home/epadmin/.ssh/id_rsa
debug3: no such identity: /home/epadmin/.ssh/id_rsa
debug1: Trying private key: /home/epadmin/.ssh/id_dsa
debug3: no such identity: /home/epadmin/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug3: packet_send2: adding 64 (len 52 padlen 12 extra_pad 64)
我无法在没有密码的情况下登录
一块sshd_config。我试图取消注释RSAAut并将no粘贴到密码auth。没有变化
# Authentication:
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedKeysCommand none
#AuthorizedKeysCommandRunAs nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no
答案 0 :(得分:0)
您的问题应该是服务器故障。这是一个基本的麻烦,或者我应该说两个:
默认sshd_config文件不需要进行任何更改以进行密钥验证。 对于您的问题,最好放置您使用的ssh命令行。
答案 1 :(得分:0)
终端中的错误解决方案
Activity
xx - ip host
答案 2 :(得分:0)
①你的目录.ssh应该是0700而.ssh dir和他儿子的文件的作者和团体是你的
②authorified_keys应为0600或0644
③你可以将公共authorkey内容复制到authorized_keys不运行,现在你可以尝试将authorkey复制到远程主机你的dir .ssh并重命名authorized_keys,是的,你可以尝试一下!我的英语水平很差