下载openssh-server-7.4p1-21.el7.x86_64.rpm
rpm -ivh openssh-server-7.4p1-21.el7.x86_64.rpm
vi /etc/ssh/ssh_config
打开这几行,如果没有需要新增:
PasswordAuthentication yes
Port 22
PasswordAuthentication yes
保存并退出
service sshd start
打开virtualbox
其中主机IP直接填写127.0.0.1 主机端口 22 子系统 IP为centos ifconfig查到的地址 子系统端口也填写22,注意需要检查物理机跟该ip是否相互ping通
使用工具连接 127.0.0.1的端口22即可