1. 在本地生成公钥密码:
http://www.cnblogs.com/ayseeing/p/3572582.html
$ cd ~/.ssh
$ ls
$ ssh-keygen -t rsa -C "your_email@example.com"
2. 先通过密码方式登录远程服务器
$ chmod 700 .ssh
$ cd .ssh
将生成的公钥拷贝到远程服务器的 ~/.ssh/authorized_keys
$ chmod 600 authorized_keys
3. 使用公钥方式登录 远程服务器
$ ssh xx.xx.xx.xx -l username
4. ubuntu 创建用户
http://blog.csdn.net/lincyang/article/details/20922749