# VM virtual box ssh connection
1. select 'file', 'tools', 'net adminstrator'

2. set another IP. (an IP already exists)

3. Do command `ipconfig` on Windows cmd to check virtual box network is online and get the IP.

4. Do command `ifconfig` on Linux server to get server IP.

5. Click 'setting' on your virtual machine.

6. Open 'Network', unfold 'Advance Setting', click 'Port Forwarding'

7. Click the bottom on the right side to add a new IP.

8. Set the parameters. Nameing your connection, host IP is your windows IP from step 3, and guest IP is from your server.

9. On your server, try to do the command `sudo service ssh status`, if the ssh tools have not being installed, please install the tools via these instructions:

```linux=
sudo apt-get update
sudo apt-get install openssh-server -y
```
10. If the ssh tools have already being installed properly, enable the ssh service.

11. Connecting to the server.

Successfully connecting to the server.
## If using vscode and the ip had been used before
* Delete old ssh setting
* C:\Users\$(username)\.ssh
* Delete `known_hosts` and `known_hosts.old`