How Do You Keep a Session Alive in Unix?
Contents

How do I keep my ssh session alive after disconnecting?

How to keep processes running after ending ssh session

  1. ssh into your remote box. type screen Then start the process you want.
  2. Press Ctrl-A then Ctrl-D. This will detach your screen session but leave your processes running. …
  3. If you want to come back later, log on again and type screen -r This will resume your screen session, and you can see the output of your process.

How do I keep my ssh session alive?

To set the SSH keep alive option on the server:

  1. Log in as root.
  2. Edit the file at /etc/ssh/sshd_config.
  3. Add this line to the file: ClientAliveInterval 60.
  4. Save the file.
  5. Restart sshd on the server.
James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest