本地使用ssh
连接到服务器总是报错:
ssh_exchange_identification: read: Connection reset by peer
本人不是很熟悉 linux, 我输入了这条指令:
/usr/sbin/sshd -d
信息如下:
debug1: sshd version OpenSSH_7.6, OpenSSL 1.0.2n 7 Dec 2017
debug1: key_load_private: Permission denied
Could not load host key: /etc/ssh/ssh_host_rsa_key
debug1: key_load_private: Permission denied
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
debug1: key_load_private: Permission denied
Could not load host key: /etc/ssh/ssh_host_ed25519_key
debug1: setgroups() failed: Operation not permitted
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Permission denied.
debug1: Bind to port 22 on ::.
Bind to port 22 on :: failed: Permission denied.
Cannot bind any address.
网上搜索了一些文章, 但是还是无法解决错误, 请问该如何根据这个信息修复我目前的问题?
谢谢
执行上面的命令(sshd)需要用管理员root权限或sudo