Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- IntelliJ
- port
- plugin
- resource
- grep
- 네트워크
- Quartz
- maVen
- find
- xargs
- VirtualBox
- ssh
- Windows
- Mac
- JavaScript
- web.xml
- 단축키
- 줄바꿈 문자
- vscode
- lsof
- GIT
- import
- Windows 10
- profile
- tomcat
- netsh
- context
- Source
- bash
- Eclipse
Archives
- Today
- Total
develog
[bash] 쉘 스크립트 파일을 다른 서버에서 실행 본문
로컬에 있는 쉘 스크립트 파일을 원격 서버에서 실행하기
# 스크립트 파일을 원격 서버에서 실행
ssh root@192.168.56.11 'bash -s' < test.sh
# 여러 줄의 명령을 원격서버에서 실행
ssh root@192.168.56.11 "bash -s" <<-EOF
cd /var/www/html
mv main main_bak
EOF
원격 서버에 있는 쉘 스크립트 파일을 로컬에서 실행하기
ssh root@192.168.56.11 'cat /root/test.sh' | bash
curl -fsSL http://192.168.1.1/home/user/script.sh | bash
Comments