SSH RSA AUTHENTICATION CONFIGURATION
来源:互联网 发布:淘宝怎么开虚拟网店 编辑:程序博客网 时间:2024/06/02 02:15
我们通常会在Shell脚本里用ssh登录到远程主机上。但是如果不用RSA认证的话,会提示输入登录密码,这就不利于非交互形式下的自动化处理。
关于ssh rsa的配置很简单,需要注意的地方时几个文件的访问权限。
现在有两台主机,local和remote,我们希望在local上执行ssh remote不需要输入密码自动登录到remote上。配置如下:
##On Local##
1. cd $HOME/.ssh
##如果.ssh不存在的话,可以创建这个目录,访问权限是700.
2. ssh-keygen -t rsa
然后连续输入回车即可。然后会生成2个文件: id_rsa 和 id_rsa.pub。id_rsa里保存的是私钥,id_rsa.pub里保存的是公钥。id_rsa的权限是600,id_rsa.pub的权限是644。
3. scp id_rsa.pub remote:$HOME/.ssh
##On Remote##
1. cd $HOME/.ssh
2. cat id_rsa.pub >> authorized_keys
注意authorized_keys文件的访问权限是必须是644.
至此,所有的配置完成,可以在local上输入ssh remote后无需输入密码即可登陆remote主机。因为scp也是用ssh连接,所以scp local remote也无需输入密码。
- SSH RSA AUTHENTICATION CONFIGURATION
- How to Use RSA Key for SSH Authentication
- ssh rsa
- 802.1x network authentication configuration
- Password File Authentication & Listener Configuration
- SSH Public Key Authentication
- Git add ssh authentication
- github SSH authentication
- Portal Server configuration for RSA
- RSA SecurID Authentication linux sshd PAM deploy
- ssh rsa备忘
- ssh rsa自动登录 【转】
- SSH的Password Authentication failed问题
- How to run (git/ssh) authentication agent?
- ssh登录-Permission denied/authentication methods available
- 使用public key来做SSH authentication
- Introduction and Configuration SharePoint 2013 Forms Based Authentication
- Dynamics CRM 2013 Claim Based Authentication & IFD Configuration Tips
- 在windows下搭建学习PyQt4的环境
- 用Ajax实现的验证用户名是否重复实例
- flex ststes 跳转间的事件数据显示
- Application与Module互调
- ADO.Net连接池和连接字符串剖析
- SSH RSA AUTHENTICATION CONFIGURATION
- 一次欧洲聚会:我的中国式骄傲被瞬间击垮!
- C && C++函数定义小结
- 项目二:基于RFID物流关系系统开发过程中的一些问题
- bindingNavigator 与textbox 联动
- Ext中文乱码决方案——最简单的就是最适合的
- 新鲜玩意儿
- Java中常用的数据结构
- 和客户谈需求