比较来自世界各地的卖家的域名和 IT 服务价格

无法连接到服务器 Centos 经过 SSH, 除非用户 root

我有一个数字滴的海洋,目前允许我直接通过用户登录 root 穿过 SSH, 由于添加了相应的键

authorized_keys

文件。

ssh root@master // this works fine and i'm logged in as root

当我尝试在没有权威的情况下作为常规用户登录时出现问题。 root - 当我启动以下命令时,我有以下结果:

注意:我添加了适当的键 'bobby' 如在根文件中 authorized_keys, 对用户来说都是

authorized_keys

文件但不能进入 - 有任何想法吗?

笔记 - 这是在服务器上 Centos - 他继续返回错误

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).


ssh bobby@master -vT

OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to master [123.456.789.111] port 22.
debug1: Connection established.
debug1: identity file /home/bobby/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/bobby/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bobby/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bobby/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bobby/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bobby/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bobby/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/bobby/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to master:22 as 'bobby'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client-&gt;server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:TLaJd7HJk3UVeqzrBgrQq6FfT1P20ZYAO918vRgU9Xg
debug1: Host 'master' is known and matches the ECDSA host key.
debug1: Found key in /home/bobby/.ssh/known_hosts:17
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:1vSLjFQBt1RFnBAwsTqBRE6RWQM0lDyqBdIRblVhkk8 /home/bobby/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Trying private key: /home/bobby/.ssh/id_dsa
debug1: Trying private key: /home/bobby/.ssh/id_ecdsa
debug1: Trying private key: /home/bobby/.ssh/id_ed25519
debug1: No more authentication methods to try.
bobby@master: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

</rsa-sha2-256,rsa-sha2-512></implicit></implicit>
已邀请:

裸奔

赞同来自:

通常:您只能从客户端调试某个部分; 还要检查远程服务器上的日志。

通常 sshd 写出拒绝访问的原因

/var/log/secure

. (非常典型的所有权和许可问题

~/.ssh/authorized_keys

.)

裸奔

赞同来自:

提供的打开关键: RSA SHA256: 1vSLjFQBt1RFnBAwsTqBRE6RWQM0lDyqBdIRblVhkk8 /home/bobby/.ssh/id_rsa

可以继续的身份验证: publickey, gssapi-keyex, gssapi-with-mic d

这一切都说。 您只启用了一个打开的关键身份验证。 确保您有允许的 authorized_keys 为用户而不是你的 rsa 拒绝了。

authorized_keys 必须属于用户和 chmod 700

奔跑吧少年

赞同来自:

作为用户 root 在您的Linux计算机上,检查文件 «/ etc / ssh / sshd_config» 有一个字符串 «AllowUsers».

在那里添加用户 SSH, 然后运行 «service sshd restart».

此外,您还可以将此用户添加到Speu列表中。

要回复问题请先登录注册