sftp 나 ssh 기반의 명령어를 사용할 때 password 를 항상 입력해야하는 것이 번거로울 수 있습니다. sshpass 는 파라미터나 파일을 통해 입력받은 암호를 이용하여 쉽게 ssh 를 연결할 수 있고, 응용한다면 batch 파일이나 script 를 통해 다음 명령어도 수행할 수 있습니다. ssh 기반 명령어의 자동화에 아주 유용합니다.
이번 포스팅은 sshpass 명령이 없는 경우 source 코드를 다운받아서 설치하는 과정을 간단하게 설명드리겠습니다.
sshpass download 사이트
sourceforge.net/projects/sshpass/
Non-interactive ssh password auth
Download Non-interactive ssh password auth for free. Sshpass is a tool for non-interactivly performing password authentication with SSH's so called "interactive keyboard password authentication". Most user should use SSH's more secure public key authentiac
sourceforge.net
sshpass sourceforge 페이지에 접속해서 download 받습니다.
다운받은 파일을 압축해제합니다.
tar xzvf sshpass-1.06.tar.gz
디렉토리 안으로 이동해서 컴파일 및 인스톨합니다.
./configure
- sshpass compile 기본 설정
make
- compile
make install
- binary install
which sshpass
- install 확인.
install 확인까지 정상적으로 되었습니다.
이제 sshpass 명령어를 사용할 수 있습니다.
'프로그래밍 > 리눅스' 카테고리의 다른 글
[리눅스] linux 에서 listen하고 있는 port 확인하는 4가지 방법 (9) | 2020.11.30 |
---|---|
[리눅스] sftp 자동화 스크립트 - sshpass (6) | 2020.11.30 |
[리눅스] hostname, 호스트명 변경 방법 (11) | 2020.11.27 |
[리눅스] hostname 오류 "unable to resolve host" 해결 방법 (1) | 2020.11.27 |
[C언어] 시간 차이 구하는 방법 - difftime 간단 예제 (6) | 2020.11.16 |
댓글