SSH连接虚拟机

虚拟机中设置网络连接模式为桥接模式,Ubuntu中手动设置网络参数,将Ubuntu的IP设置成与windows同一网段,并且确保能互相ping通。

安装SSH-server

终端下输入命令: sudo apt-get install openssh-server

启动SSH-server

sudo /etc/init.d/ssh start

windows下使用软件PuTTy,填入刚刚设置好的Ubuntu的IP,直接连接,接下来就尽情的玩吧(当然,虚拟机得先打开)。

P.S. 关于Connection refused错误

如果出现以下错误,则很可能是因为还没有安装ssh-server:
ssh: connect to host localhost port 22: Connection refused

猜你喜欢

转载自jwfdp.iteye.com/blog/1847808