SSH 세션 종료후에도 작업하던것 살려놓기!
시뮬레이션을 돌리다보면 SSH 연결이 끊어지는 경우가 발생한다. 이럴때 문제가 돌고 있던 시뮬레이션도 종료 되버린다는 것. 그래서 SSH 세션 종료후에도 작업하던것 살려놓는 방법이 있어야 하는데 Google에서 찾아보니 screen이라는 것을 통해서 살려 놓는 방법이 있음..
http://www.howtogeek.com/howto/ubuntu/keep-your-ssh-session-running-when-you-disconnect/
Keep Your SSH Session Running when You Disconnect
Screen is like a window manager for your console. It will allow you to keep multiple terminal sessions running and easily switch between them. It also protects you from disconnection, because the screen session doesn’t end when you get disconnected.
You’ll need to make sure that screen is installed on the server you are connecting to. If that server is Ubuntu or Debian, just use this command:
sudo apt-get install screen
Now you can start a new screen session by just typing screen at the command line. You’ll be shown some information about screen. Hit enter, and you’ll be at a normal prompt.
To disconnect (but leave the session running)
Hit Ctrl + A and then Ctrl + D in immediate succession. You will see the message [detached]
To reconnect to an already running session
screen -r
To reconnect to an existing session, or create a new one if none exists
screen -D -r
To create a new window inside of a running screen session
Hit Ctrl + A and then C in immediate succession. You will see a new prompt.
To switch from one screen window to another
Hit Ctrl + A and then Ctrl + A in immediate succession.
To list open screen windows
Hit Ctrl + A and then W in immediate succession
There’s lots of other commands, but those are the ones I use the most.