sshpass简介及安装

sshpass简介:

        ssh登陆不能在命令行中指定密码,sshpass 的出现,解决了这一问题。它允许你用 -p 参数指定明文密码,然后直接登录远程服务器,它支持密码从命令行、文件、环境变量中读取。

sshpass安装:

源码下载地址:http://sourceforge.net/projects/sshpass/

  1. tar -zxvf sshpass-1.05.tar.gz
  2. cd sshpass-1.05
  3. ./configure
  4. make && make install

安装完成后输入sshpass出现如下提示即安装成功:

[root@test ~]# 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@test ~]#





你可能感兴趣的:(安装,sshpass)