Ubuntu配置SSH

1.安装SSH

sudo apt-get install openssh-server

2.启动服务

sudo /etc/init.d/ssh start

3. 查看是否正确启动

ps -e | grep ssh

4. 生成公钥和私钥

ssh-keygen -t rsa

5. 查看公钥和私钥

6.将自己的公钥追加到authorized_keys中

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

7.登录SSH(这里就不再需要输入密码了)

ssh localhost


 
8.退出exit


  
 
 


 
 

猜你喜欢

转载自agilestyle.iteye.com/blog/2280860
今日推荐