Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 1.11 KB

SSH-tips.md

File metadata and controls

67 lines (41 loc) · 1.11 KB

get IP of the labMonster

curl http://myip.dnsomatic.com

Using screen to run commands/script on the back ground

basics

screen allows, banally, to run a command and then close the remote connection while keeping the monster working for you.

  • create a screen session
screen -S name-of-the-screen
  • exit a screen session with the keyboard combination

| ctrl + a then d

  • you can create multiple screen session, to list the working screen sessions
screen -ls
  • log in a specific screen session
screen -r name-of-the-screen
  • terminate a screen session while in it
exit

pro level

  • how to know if you are already in a screen session
echo $STY
  • rename screen session

ctrl + a then A

  • discover more screen options

ctrl + a then ?

Exchange files from and to labMonster

scp command

  • move around a directory recursively (in the example, from the labMonster to local computer)
scp -r [email protected]:/path/to/remote/source /path/to/local/destination

datalad