Skip to content

Remote machine shell

SSH

Create an ssh tunnel

# ssh to a specific port that's not 22
ssh -p 56789 root@localhost
ssh root@127.0.0.1 -p 56789 -N -L 5433:database-url:5432

Ignore changing ssh host for 127.0.0.1

REMOTE HOST IDENTIFICATION HAS CHANGED

$cat ~/.ssh/config
Host 127.0.0.1
   StrictHostKeyChecking no
   UserKnownHostsFile=/dev/null

Transfer files with croc

# Terminal 1
$ croc send test.tif
Code is anita-price-quick
# Terminal 2
crock anita-price-quick

tmux: Close a shell without killing the app that it's running

  • used at IBM when I connected to the Fyre VM
  • an IDE or a long running script

  • ctrl z (to send program to background)

  • disown -a

Last update: 2023-04-24