要在SecureCRT中配置SSH密钥,请按照以下步骤操作:
生成密钥对:
Tools
> Create Key Pair...
。Finish
生成密钥对,通常会生成两个文件:Identity
(私钥)和 Identity.pub
(公钥)。上传公钥到服务器:
Identity.pub
文件上传到远程服务器的 ~/.ssh
目录下。可以使用FTP或其他文件传输工具。cd /home/your_user
mkdir -p .ssh
chmod 700 .ssh
mv Identity.pub .ssh/authorized_keys
chmod 644 .ssh/authorized_keys
配置服务器SSH:
/etc/ssh/sshd_config
:sudo vim /etc/ssh/sshd_config
PermitRootLogin no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
RSAAuthentication yes
PasswordAuthentication no
sudo /etc/init.d/ssh restart
在SecureCRT中配置会话:
File
> New Session...
。SSH2
协议。SSH2
标签下,选择 PublicKey
认证,并点击 Browse
导入私钥文件(Identity
)。OK
保存会话配置。完成以上步骤后,您可以通过SecureCRT使用SSH密钥对进行登录,而无需输入密码。这样可以提高登录的安全性和效率。
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: linux怎么获取windows文件