以前连接是没有问题的,换了个ip地址就会报整错。求大佬救助一下
- 发布:2018-03-07 11:27
- 更新:2020-04-27 08:59
- 阅读:5763
需要直接在服务器(我用的是Ubuntu)中找到此文件: /etc/ssh/sshd_config
并且在最后添加以下两行代码:
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,blowfish-cbc,aes128-cbc,3des-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
KexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
保存
重启SSH:
service sshd restart
即可
l***@qq.com - 90后程序员
我的操作系统是ubutu-18.0.4 配置之后重新sshd报错
root@litong-Inspiron-3458:~# systemctl restart sshd
Job for ssh.service failed because the control process exited with error code.
See "systemctl status ssh.service" and "journalctl -xe" for details.
root@litong-Inspiron-3458:~# systemctl sttus sshd
Unknown operation sttus.
root@litong-Inspiron-3458:~# systemctl status sshd
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-04-27 08:54:49 CST; 11s ago
Process: 21464 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 21461 ExecReload=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Process: 820 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=0/SUCCESS)
Process: 32061 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255)
Main PID: 820 (code=exited, status=0/SUCCESS)
4月 27 08:54:49 litong-Inspiron-3458 systemd[1]: ssh.service: Service hold-off time over, scheduling restart.
4月 27 08:54:49 litong-Inspiron-3458 systemd[1]: ssh.service: Scheduled restart job, restart counter is at 5.
4月 27 08:54:49 litong-Inspiron-3458 systemd[1]: Stopped OpenBSD Secure Shell server.
4月 27 08:54:49 litong-Inspiron-3458 systemd[1]: ssh.service: Start request repeated too quickly.
4月 27 08:54:49 litong-Inspiron-3458 systemd[1]: ssh.service: Failed with result 'exit-code'.
4月 27 08:54:49 litong-Inspiron-3458 systemd[1]: Failed to start OpenBSD Secure Shell server.
ubuntu-18.0.4 该如何配置