目录
目录
LINUX SSH免密登录
即看即用
Server A 要免密登录Server B (192.168.254.129)
在Server A 上
1、生成公钥,一路enter选择默认
ssh-keygen -t rsa
2、公钥拷贝到Server B(192.168.254.129)上并授权
ssh-copy-id 192.168.254.129
3、确认能免密登录
ssh 192.168.254.129
退出:logout或exit
ssh 重启命令
systemctl restart sshd.service
ssh-copy-id 卡住问题:
解决方法:
重新打开SSH窗口
或ssh-copy-id 卡住问题_t0m的专栏-CSDN博客
ssh-copy-id 报错问题:
[SDS_Admin@rdma65 ~]$ ssh-copy-id 182.200.31.109
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/SDS_Admin/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
ERROR: Someone could be eavesdropping on you right now (man-in-the-middle attack)!
ERROR: It is also possible that a host key has just been changed.
ERROR: The fingerprint for the ECDSA key sent by the remote host is
ERROR: SHA256:XLT1B1ux5ga+061Fh3O2cNaP2ZiqeNBNl15N7fd37ms.
ERROR: Please contact your system administrator.
ERROR: Add correct host key in /home/SDS_Admin/.ssh/known_hosts to get rid of this message.
ERROR: Offending ECDSA key in /home/SDS_Admin/.ssh/known_hosts:5
ERROR: ECDSA host key for 182.200.31.109 has changed and you have requested strict checking

本文详细介绍了如何在Linux上配置SSH免密登录,包括在Linux和Windows系统中生成密钥、拷贝公钥到远程服务器、修改SSH配置文件以及解决常见问题的方法。通过这些步骤,可以实现Server A免密登录到Server B。

2万+

被折叠的 条评论
为什么被折叠?



