week 3 : remote connections to vm
- In order for to connect to a remote server. The server must have a program that is always listening to connections.
commands
ip a- show all IP addressesclear- clear screenwhich- display path to a programusers- shortname of all logged in usersw- more information on every user logged insudo apt install openssh-server- install ssh server (if not)
ssh into VirtualBox
-
make sure virtual box machine is attached ot bridge adapter to enable easy ssh
Settings > Network > adapter 1 > attached to > Bridged adapter
-
connect ith ssh
ssh -l <user> <ip>-
enter users password
-
virtualbox command line
- add
export PATH="$PATH:/c/Program Files/Oracle/VirtualBox"to .bashrc vboxmanage startvm <vmname> --type headlessstart the vm in headless modevboxmanage list runningvmslist running vmsvboxmanage list vmslist all vmsvboxmanage controlvm <vmname> poweroffpower off headless vm
vi Basics
i- change to insert modeESC- change to command modearrow keys- navigation:wq- save and quit:q!- quite without saving:w- save without exiting