일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Frida
- Sequoia
- CJ대한통운 #쿠팡 #통관번호오류 #통관고유번호오류 #안주원팀장 #모건인베스트
- shell_gpt
- NUGU
- 모의해킹
- 보이스피싱 #대검찰청 #명의도용 #비밀번호 #계좌번호 #공공기관 #가짜검찰청
- 중고나라
- CryptoJS
- XSS
- speed-measure-webpack-plugin
- self-signed
- 거래사기
- intelmac
- ssrf
- 채팅환전사기
- 네이버카페
- 많다..
- MongoDB #NoSQL #CreateUser #DropUser #mongod #mognod.conf
- ue4dumper
- 취약점
- 안전결제
- esbuild
- 변태는
- 허리디스크
- react
- 로맨스스캠
- 척추관협착증
- Malware Sample
- open redirect
- Today
- Total
annyoung
ssh process continuation 본문
[english]
if disconnect ssh, process will be dead. so we using linux "screen".
# nopsled@localhost:~/Documents (=`ω´=)$ screen -S test
/* now created new screen ttys is 005 */
# nopsled@localhost:~/Document (=`ω´=)/$ screen -list
There is a screen on:
5960.test (Attached)
/* if you want execute test.py on ssh connection forever, using & and detach it */
# nopsled@localhost:~/Documents (=`ω´=)$ python test.py &
/* detach it now */
# nopsled@localhost:~/Documents (=`ω´=)$ screen -d
[remote detached]
/* now get out screen. and working at ttsy002*/
# nopsled@localhost:~/Documents (=`ω´=)$ ps -ef | grep python
501 6043 5962 0 10:55AM ttys005 0:05.16 python test.py
501 6012 5767 0 10:51AM ttys002 0:00.00 grep python
if you want re attach it, using "screen -r pid" like next.
nopsled@localhost:~/Documents (=`ω´=)$ screen -list
There is a screen on:
6080.test (Detached)
1 Socket in /var/folders/4c/8lgn3z2970v0qkwn2z08twhh0000gn/T/.screen.
nopsled@localhost:~/Documents (=`ω´=)$ screen -r 6080
if you want terminate screen, using exit!
nopsled@localhost:~/Documents (=`ω´=)$ exit
[screen is terminating]
nopsled@localhost:~/Documents (=`ω´=)$
[한국어]
끊긴 ssh에서 프로세스를 계속 사용하기 위해서는 screen을 사용해야 한다.
screen -list를 이용하여 리스트를 보고 screen -r을 사용하여 attach, screen -d를 사용하여 detach를 한다.
프로세스를 실행시킨후 screen -S 하는게 아닌, screen -S를 사용하여 새로운 스크린을 만든 후 프로세스를 실행시켜야 원활히 돌아간다.
'운영체제' 카테고리의 다른 글
ssh process continue after logout (0) | 2018.04.19 |
---|---|
Mac high sierra apache connection refused error (0) | 2018.01.08 |
/usr/bin/dpkg returned an error code (1) in ubuntu (0) | 2015.08.18 |
how to resolve nokogiri 1.6.5 compile error (0) | 2015.01.24 |
metasploit on mac (0) | 2015.01.23 |