Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i've established a vpn-connection. in the vpn i connected to a server via: ssh -X ipadress . then the prompt comes up and i start a script on the server with: sh script . this script will take a very long time, but how can i shutdown my pc without affecting the connection to the sever, or better asked: how can i leave him alone?


share|improve this question
up vote 2 down vote accepted

You need to install screen and run it inside of screen (which will replace the controlling ptty) and you'll be able to recover your session when you log back in again.

share|improve this answer
+1. you'll want crtl-a D to disconnect screen, and screen -r to reconnect it again. – Sirex Dec 17 '10 at 15:47
shall i install screen on the server or on my client? – EnterpriseMaster Dec 17 '10 at 15:48
Install screen on the server. When you initially connect to the server execute screen to start an instance. Then execute your script command. Then as Sirex stated, do <ctrl-a> followed by a d to disconnect from the screen instance and return to your normal shell from which you can completely exit. When you are ready to reconnect, execute screen -r to reattach. – Daemon of Chaos Dec 17 '10 at 17:32

screen (as mentioned above) is a good one, but if you're not too fussed about being able to control the process after running it, you can just do:-

nohup <process> &

Then log out, and the process will stay running.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.