下载openssh-server
apt-get install openssh-server
通过ps -ef| grep ssh 查看
可能发现没有一个叫做sshd的东西。 这时候重启机器即可
对于普通用户 ssh localhost应该就能登录了
但是对于root用户,可能会拒绝 ,需要修改文件
cd /etc/ssh
vim sshd_config
修改 PermitRootLogin yes 成yes (默认的是什么我不知道了,反正改成yes)
再重启,root用户也能ssh登录了
----------------------------------
但是此时还需要输入密码登录
配置免输入密码登录(免密码登录方法来自 http://www.powerxing.com/install-hadoop/)
cd ~/.ssh/ # 若没有该目录,请先执行一次ssh localhost
ssh-keygen -t rsa # 会有提示,都按回车就可以
cat ./id_rsa.pub >> ./authorized_keys # 加入授权