screen

davidbam
General Bitchin'
General Bitchin'
Posts: 6371
Joined: Wed Aug 15, 2018 1:15 pm
Location: Huntly, Scotland
Contact:

#1 screen

Post by davidbam »

The screen program is enormously useful. Use it outbound from a local *nux workstation to connect to other (usually headless) *nix workstations. *nix meaning Linux, raspberryPi, freeBSD etc. I'll assume you have /etc/hosts setup on the local machine. Remote is usually on your LAN but could be anywhere. Only thing needed on the remote is ssh server e.g. openssh-server

Code: Select all

screen -d -R remotemachine
# you are still on your local machine at this time

ssh -Y remotemachine
# you are now on remotemachine and can login, go sudo, anything you want.  They -Y parameter means you can even run X programs and they will display on your local machine

type Ctrl-a followed by Ctrl-d
# this will detach the screen on the remote machine but LEAVES IT ALL RUNNING

# you are now back at local machine.  To re-attach and pick up where you left off, just re-enter
screen -d -R remotemachine
I think this is fool-proof but could you just try it for me please? • There are 10 types of people in the world; those who understand binary, and those who don’t
Image

Return to “Linux”