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
- xargs
- maVen
- tomcat
- Eclipse
- netsh
- profile
- Windows 10
- context
- Mac
- GIT
- resource
- import
- Quartz
- Windows
- JavaScript
- 네트워크
- vscode
- bash
- VirtualBox
- plugin
- ssh
- lsof
- 줄바꿈 문자
- web.xml
- port
- find
- 단축키
- Source
- grep
- IntelliJ
Archives
- Today
- Total
develog
[bash] 로컬 shell script 파일을 원격 서버에서 실행하기 본문
bash 명령어를 원격 서버에서 실행하기
$ ssh user01@ubuntu01 hostname
sh -s
로컬 서버의 shell script 파일을 원격 서버에서 실행하기
$ ssh user01@ubuntu01 'bash -s' < aa.sh
$ ssh user01@ubuntu01 'sh -s' < aa.sh
$ ssh user01@ubuntu01 sh -s < aa.sh
sh -c
ssh 연결시 원격 서버에서 실행할 명령 script 를 함께 전달
$ ssh user01@ubuntu01 'sh -c hostname'
$ ssh user01@ubuntu01 sh -c 'pwd > curr_dir.txt'
'OS & Shell > bash' 카테고리의 다른 글
[bash] tmux (0) | 2020.09.16 |
---|---|
[bash] 다중 명령 실행 && || ; (0) | 2020.09.15 |
[bash] existStr (0) | 2019.02.15 |
[bash] function return (0) | 2019.02.15 |
[bash] kill ps grep awk (0) | 2019.02.15 |
Comments