Linux Server Deployment(IV)SSH private/public key
来源:互联网 发布:mac打开不被认证的app 编辑:程序博客网 时间:2024/05/17 06:13
http://sillycat.iteye.com/blog/monthblog/2011-06?show_full=true
Linux Server Deployment(IV)SSH private/public key
- 博客分类:
- 总结笔记
SSHLinuxITeyePHPBBS
Linux Server Deployment(IV)SSH private/public key
1. generate the public/private keys for SSH on local server
>ssh-keygen -t rsa
Enter file in which to save the key():
Enter passphrase(empty for no passphrase):
Enter same passphrase again:
You identification has been saved in /home/username/.ssh/id_rsa.
You public key has been saved in /home/chengdu/.ssh/id_rsa.pub.
2. remote server and configuration
copy the keys from id_rsa.pub to remote server ~/.ssh/
>scp id_rsa.pub username@server.com:~/.ssh/
logon the remote server
>ssh username@server.com
put the public key in file authorized_keys
>cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
change the authority
>chmod 711 ~/.ssh
>chmod 644 ~/.ssh/authorized_keys
3. Success
>ssh username@server.com
I do not need to type password again.
references:
http://bbs.chinaunix.net/viewthread.php?tid=111248
http://shutiao2008.iteye.com/blog/315102
http://lhflinux.blog.51cto.com/1961662/526122
http://www.josephj.com/article/understand-ssh-key/
1. generate the public/private keys for SSH on local server
>ssh-keygen -t rsa
Enter file in which to save the key():
Enter passphrase(empty for no passphrase):
Enter same passphrase again:
You identification has been saved in /home/username/.ssh/id_rsa.
You public key has been saved in /home/chengdu/.ssh/id_rsa.pub.
2. remote server and configuration
copy the keys from id_rsa.pub to remote server ~/.ssh/
>scp id_rsa.pub username@server.com:~/.ssh/
logon the remote server
>ssh username@server.com
put the public key in file authorized_keys
>cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
change the authority
>chmod 711 ~/.ssh
>chmod 644 ~/.ssh/authorized_keys
3. Success
>ssh username@server.com
I do not need to type password again.
references:
http://bbs.chinaunix.net/viewthread.php?tid=111248
http://shutiao2008.iteye.com/blog/315102
http://lhflinux.blog.51cto.com/1961662/526122
http://www.josephj.com/article/understand-ssh-key/
- Linux Server Deployment(IV)SSH private/public key
- Create an SSH public and private key pair for Linux VMs (转载)
- 通过public、private key登陆linux主机
- 使用public/private key让putty(ssh)自动登录
- 使用public/private key让putty(ssh)自动登录
- 使用public/private key让putty(ssh)自动登录(以及linux上使用密钥做ssh自动登陆)
- ssh private key
- SSH Public Key Authentication
- Linux上强制SSH工具使用指定的private key
- linux相关-ubuntu使用ssh public key登陆
- Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录
- Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录
- Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录
- Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录【已成功实例】
- Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录
- Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录【已成功实例】
- Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录【已成功实例】
- SourcTree导入ssh private key
- Synchronize access to shared mutable data
- Java语言实现的各种排序源代码--快速排序
- iphone自定义view
- 乔布斯:在人间
- java堆栈(转)
- Linux Server Deployment(IV)SSH private/public key
- webdriver常用技巧(java)
- 各种排序代码 .
- 我喜欢你,很久了。等你,也很久了。现在,我要离开,比很久很久还要久……
- 与时间有关函数 (续)
- [转载]压缩大战真相
- C++ 静态存储区 栈 堆的区别 .
- 常用的匹配正则表达式和实例
- 关于页面超时(C#)