【SSH】SSH 免密码登录配置|Secure Shell 免密认证登录|linux 生成密钥

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

目录

LINUX SSH免密登录

即看即用

详细说明

免密登录原理

Secure Shell 免密认证登录

linux 生成密钥

windows 生成密钥


目录

LINUX SSH免密登录

即看即用

详细说明

免密登录原理

Secure Shell 免密认证登录

linux 生成密钥

windows 生成密钥


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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值