Tunneling

Keep persistent SSH session using autossh and cron

Keep persistent SSH session using autossh and cron

Keep persistent SSH session using autossh and cron

Background Knowledge

SSH Tunneling

  • Local Port Forwarding: used to forward a port from the client machine to the server machine.
  • Remote Port Forwarding:

Local Port Forwarding

ssh -L [bind_addr:]port:target_addr:target_port user@server
  • bind_addr
  • port
  • target_addr
  • target_port
  • user
  • server

Remote Port Forwarding

ssh -R [bind_addr:]port:target_addr:target_port user@server
  • bind_addr
  • port
  • target_addr
  • target_port
  • user
  • server