Environment
PC: windows
PC software: WinSCP
virtual machine: Ubuntu
Ubuntu 配置
First confirm whether the ssh service of the virtual machine is turned on
ps -e | grep ssh
If there is only ssh-agent, then ssh-server has not been started, and /etc/init.d/ssh start is required. If you see sshd, it means that ssh-server has been started. If it fails to start, it means you need to install ssh service:
sudo apt-get install sshd 或
sudo apt-get install openssh-server
After installation, start successfully
service sshd start 或
/etc/init.d/ssh start
VirtualBox configuration
The number of NICs needs to be closed when Ubuntu is running.
NIC 1 sets the network address translation (default) (in this mode, the same DNS as the PC)
NIC 2 sets the Host-Only network
Telecommunication
After configuration, start Ubuntu, terminal input: Ifconfig to view the network address, the second is the ip address in Host-Only, we ping the
communication successfully on the PC side , open WinSCP and
fill in the corresponding information to
log in, if you see the following effect Congratulations - >> success
summary