useradd yourname
passwd yourname
mkdir /home/yourname
chown yourname: /home/yourname
vim /etc/ssh/sshd_config
PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes
PermitRootLogin no
AuthorizedKeysFile .ssh/authorized_keys
service sshd restart
/etc/init.d/ssh restart
- 设置yourname用户为sudoers
- 增加写权限
chmod u+w /etc/sudoers
vim /etc/sudoers
- 在 root ALL=(ALL) ALL 后面增加一行
yourname ALL=(ALL) ALL
chmod u-w /etc/sudoers
su yourname
cd /home/yourname
mkdir .ssh
cd .ssh
ssh-keygen
cat id_dsa.pub >> authorized_keys
sz id_dsa
sudo apt-get update
sudo apt-get install lrzsz