[英]ssh connect Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)
I have a pair of keys to epadmin on machine A. I copied them on machine B in home folder of epadmin via scp
in folder .ssh我在机器 A 上有一对 epadmin 的密钥。我通过文件夹 .ssh 中的
scp
将它们复制到机器 B 上的 epadmin 主文件夹中
command for access : ssh epadmin@10.2.11.13访问命令: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
Here is a piece of -vvv(Verbose) log这是一段 -vvv(Verbose) 日志
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)
I can't login without password没有密码我无法登录
Piece of sshd_config. sshd_config 的一部分。 I have tried to uncomment RSAAut and paste no to password auth.
我试图取消对 RSAAut 的注释并将 no 粘贴到密码验证中。 There were no changes
没有变化
# 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
Your question should be on server fault.您的问题应该是服务器故障。 It's a basic trouble or I should say two :
这是一个基本的麻烦,或者我应该说两个:
No changes is needed to default sshd_config file for key authentification.无需更改用于密钥认证的默认 sshd_config 文件。 For your question, it should be better to put the ssh command line you use.
对于您的问题,最好将您使用的 ssh 命令行。
Solution in terminal for error在终端解决错误
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
ssh-keygen -f " ~/.ssh/known_hosts" -R xx.xx.xxx.xxx
xx - ip host xx - ip 主机
①one your dir .ssh should be 0700 and the .ssh dir and his son documents's author and group is yours ①你的目录.ssh应该是0700,.ssh目录和他儿子文档的作者和组是你的
②the authorized_keys should be 0600 or 0644 ②authorized_keys 应该是 0600 或 0644
③maybe you copy the public authorkey content to authorized_keys isn't run, now you can try copy the authorkey to the remote host your dir .ssh and rename authorized_keys , yeah you can try it! ③也许你复制公共authorkey内容到authorized_keys没有运行,现在你可以尝试将authorkey复制到远程主机你的目录.ssh并重命名authorized_keys,是的,你可以试试! poor English my be run
可怜的英语我跑了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.