| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 |
- shell_gpt
- S3
- 내부확산
- cve-2025-55182
- mitmproxy
- EC2
- intelmac
- 안전결제
- ssrf
- 중고나라
- 취약점
- react2shell
- Frida
- aes
- 척추관협착증
- LFI
- 모의해킹
- XSS
- self-signed
- 허리디스크
- AWS
- 네이버카페
- 변태는
- jeb_mcp
- 채팅환전사기
- ue4dumper
- Sequoia
- 많다..
- Malware Sample
- 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 |