Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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. –  KayakJim 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.