OpenSSH 与 SecureCRT 公钥认证登陆
2011-11-17 13:46
232 查看
在Windows客户机的SecureCRT程序的Tools菜单中,调出"Create Publib Key"向导,依提示产生一密钥对。默认产生的密钥对会存放在 "C:\Documents and Settings\%USERNAME%\Application Data\VanDyke\",其中 Identity 就是私钥文件,Identity.pub 这是公钥文件。
2 在Linux服务器上编辑 sshd.config 文件
#vi /usr/local/etc/sshd_config
做如下修改:
PasswordAuthentication no (关闭口令认证)
PubkeyAuthentication yes (开启公钥认证)
AuthorizedKeysFile .ssh/authorized_keys (认证公钥文件位置)
3 依旧在Linux服务器上
#mkdir /root/.ssh (新建/root目录下的.ssh文件夹)
#chmod 700 /root/.ssh (修改.ssh文件夹的用户权限)
4 上传Windows客户机SecureCRT生成的公钥 Identity.pub,
OpenSSH公钥没有使用采用 IETF SECSH 标准,所以和SecureCRT的公钥格式不兼容,需要使用OpenSSH自带的 ssh-keygen 命令转换以后才能被OpenSSH识别。authorized_keys 可以保存多个公钥,所以公钥格式转换导入的时候,应该使用追加符 >> ,而不是 >。
#ssh-keygen -i -f Identity.pub >> /root/.ssh/authorized_keys
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/30815/showart_411927.html
2 在Linux服务器上编辑 sshd.config 文件
#vi /usr/local/etc/sshd_config
做如下修改:
PasswordAuthentication no (关闭口令认证)
PubkeyAuthentication yes (开启公钥认证)
AuthorizedKeysFile .ssh/authorized_keys (认证公钥文件位置)
3 依旧在Linux服务器上
#mkdir /root/.ssh (新建/root目录下的.ssh文件夹)
#chmod 700 /root/.ssh (修改.ssh文件夹的用户权限)
4 上传Windows客户机SecureCRT生成的公钥 Identity.pub,
OpenSSH公钥没有使用采用 IETF SECSH 标准,所以和SecureCRT的公钥格式不兼容,需要使用OpenSSH自带的 ssh-keygen 命令转换以后才能被OpenSSH识别。authorized_keys 可以保存多个公钥,所以公钥格式转换导入的时候,应该使用追加符 >> ,而不是 >。
#ssh-keygen -i -f Identity.pub >> /root/.ssh/authorized_keys
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/30815/showart_411927.html
相关文章推荐
- SecureCRT 与 OpenSSH 公钥认证登陆
- SecureCRT和SecureFX 与 OpenSSH 公钥认证登陆
- 使用SecureCRT设置linux系统登录的ssh公钥认证
- SecureCRT使用公钥登陆ssh服务器
- 在使用不同密钥格式的服务器间实现公钥认证登陆
- 使用SecureCRT设置linux系统登录的ssh公钥认证
- ssh配置公钥和私钥登陆SecureCRT
- OPENSSH密钥登陆-免密码认证登陆(转载)
- 使用SecureCRT登陆SSH[Key方式公钥私钥]
- 如何在SecureCRT上使用公钥登陆Linux服务器
- SecureCRT上使用公钥登陆Linux服务器
- 基于公钥认证方式的 OpenSSH Server 自动登录完全手册
- SecureCRT公钥登陆配置
- linux下ssh/scp使用公钥认证方式登陆
- windows 系统下利用SecureCRT、xshell 生成ssh登陆linux的公钥
- 使用SecureCRT登陆SSH[Key方式公钥…
- 使用SecureCRT设置linux系统登录的ssh公钥认证
- SecureCRT中ssh公钥认证设置
- SecureCRT中使用VBs脚本自动telnet登陆
- C#中用windows认证登陆SQL Server的方法