"CentOS sshpass 설치"의 두 판 사이의 차이

73번째 줄: 73번째 줄:
[[분류:리눅스]]
[[분류:리눅스]]
[[분류:SSH]]
[[분류:SSH]]
[[분류:/usr/bin]]

2012년 7월 8일 (일) 08:39 판

1 yum, apt-get 설치 실패

yum과 apt-get으로 설치를 시도하였으나 패키지를 찾지 못해 설치되지 않았다.

[root@jmnote ~]# yum install sshpass -y
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
updates/metalink                                                                                   | 2.6 kB     00:00
 * fedora: ftp.tsukuba.wide.ad.jp
 * updates: ftp-stud.hs-esslingen.de
fedora                                                                                             | 3.8 kB     00:00
Setting up Install Process
No package sshpass available.
Nothing to do
[root@jmnote ~]# apt-get install sshpass
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package sshpass
[root@jmnote ~]#

2 다운로드 및 설치

2.1 명령어

wget http://download.fedora.redhat.com/pub/epel/6/x86_64/sshpass-1.05-1.el6.x86_64.rpm
rpm -Uvh sshpass-1.05-1.el6.x86_64.rpm

2.2 예시

[root@jmnote ~]# wget http://download.fedora.redhat.com/pub/epel/6/x86_64/sshpass-1.05-1.el6.x86_64.rpm
--2012-02-12 16:22:30--  http://download.fedora.redhat.com/pub/epel/6/x86_64/sshpass-1.05-1.el6.x86_64.rpm
Resolving download.fedora.redhat.com... 209.132.181.23, 209.132.181.24, 209.132.181.25, ...
Connecting to download.fedora.redhat.com|209.132.181.23|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19292 (19K) [application/x-rpm]
Saving to: “sshpass-1.05-1.el6.x86_64.rpmâ€

100%[================================================================================>] 19,292      62.4K/s   in 0.3s

2012-02-12 16:22:31 (62.4 KB/s) - “sshpass-1.05-1.el6.x86_64.rpmâ€

[root@jmnote ~]# rpm -Uvh sshpass-1.05-1.el6.x86_64.rpm
warning: sshpass-1.05-1.el6.x86_64.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID 0608b895
Preparing...                ########################################### [100%]
   1:sshpass                ########################################### [100%]

2.3 실행 확인

[root@jmnote ~]# sshpass
Usage: sshpass [-f|-d|-p|-e] [-hV] command parameters
   -f filename   Take password to use from file
   -d number     Use number as file descriptor for getting password
   -p password   Provide password as argument (security unwise)
   -e            Password is passed as env-var "SSHPASS"
   With no parameters - password will be taken from stdin

   -h            Show help (this screen)
   -V            Print version information
At most one of -f, -d, -p or -e should be used
[root@jmnote ~]# which sshpass
/usr/bin/sshpass
  • /usr/bin에 설치되었다.

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}