Linux Server Deployment(IV)SSH private/public key
2011-10-09 14:05
801 查看
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/
相关文章推荐
- Create an SSH public and private key pair for Linux VMs (转载)
- 使用public/private key让putty(ssh)自动登录(以及linux上使用密钥做ssh自动登陆)
- 使用public/private key让putty(ssh)自动登录(以及linux上使用密钥做ssh自动登陆)
- 使用public/private key让putty(ssh)自动登录(以及linux上使用密钥做ssh自动登陆)
- 使用public/private key让putty(ssh)自动登录(以及linux上使用密钥做ssh自动登陆)
- 使用public/private key让putty(ssh)自动登录
- [Linux] Enable ssh key authentication from one user on client to multiple users on server
- 使用public/private key让putty(ssh)自动登录
- linux ssh私钥登陆失败:server refused our key原因
- windows,linux,mac生成ssh public key 和 private key
- SourcTree导入ssh private key
- Linux下SSH-KEY生成
- SSH KEY Linux下无法连接问题
- 超级终端连接debian8 下的ssh 出现 “server does not support diffie-hellman-group1-sha1 for keyexchange”
- Uploading SSH public key ... failed!
- 下载代码添加 SSH Public Key的方法
- SSH远程登陆Linux Server运行cuda程序
- Windows上利用GitBash生成public ssh key
- [置顶] Linux搭建使用SSH共享存取的 Git Server
- robot framework用SSHLibrary发送ctrl-c 等控制字符(control character)到远端 ssh server(如linux server)的表格代码