您好,欢迎来到[编程问答]网站首页   源码下载   电子书籍   软件下载   专题
当前位置:首页 >> 编程问答 >> 网络通信 >> SSH远程登录主机失败,求路过的高手指点迷津

SSH远程登录主机失败,求路过的高手指点迷津

来源:网络整理     时间:2018/1/26 2:18:22     关键词:

关于网友提出的“ SSH远程登录主机失败,求路过的高手指点迷津”问题疑问,本网通过在网上对“ SSH远程登录主机失败,求路过的高手指点迷津”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题: SSH远程登录主机失败,求路过的高手指点迷津
描述:

Permission denied (publickey,password).
普通用户可以连接,用root连接就是不行,密码是对的,今天找了一天的答案,没找到,基本上都是说将permitROOTLogin no 改为permitROOTLogin yes 我改了,也重启服务了,还是不行 信息如下:
OpenSSH_7.4p1 Ubuntu-10, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.254.132 [192.168.254.132] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Ubuntu-10
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.254.132:22 as 'root'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->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:gqMi4Hmkc//5dofz+/mpEiogwAn77wZhhOl8qhAXSEc
debug1: Host '192.168.254.132' is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
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,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /root/.ssh/id_rsa
debug1: Authentications that can continue: publickey,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
debug1: Next authentication method: password


解决方案1:

新手上路,有点坑,不过已经解决了,在目标主机上也要配置sshd_config文件,允许root登录就行了。

解决方案2:

应该是shell的问题,你可以试一下Git Bash https://git-scm.com/downloads。

解决方案3:

普通用户行,root不行,就是说明root被禁止了,改一下ssh的配置,再试试。
按道理,不让root远程登陆是合理的,是最佳实践,想执行root命令你可以sudo嘛。


以上介绍了“ SSH远程登录主机失败,求路过的高手指点迷津”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/4535489.html

相关图片

相关文章