centos7如何安装sshpass

  1. 先安装epel

    yum install -y epel-release

    yum repolist

  2. 安装完成epel之后,就可以按照sshpass了

    yum install -y sshpass

  3. 验证:sshpass -V
  4. [root@hostuser ~]# sshpass -V
    sshpass 1.06
    (C) 2006-2011 Lingnu Open Source Consulting Ltd.
    (C) 2015-2016 Shachar Shemesh
    This program is free software, and can be distributed under the terms of the GPL
    See the COPYING file for more information. Using "assword" as the default password prompt indicator.
    [root@hostuser ~]#

      使用方法

    sshpass -p "yourpassword" ssh  yourusername@ip 等价于  ssh root@ip   再输入密码
    

      当远程主机端口不再是22默认端口时候:

  5. sshpass -p "password" ssh -p  8443  username@ip
    

      

最新文章

  1. opencv基于混合高斯模型的图像分割
  2. Python基础8- 序列
  3. Linux命令学习手册-printf命令(转)
  4. MongoDB sharding cluster Step by Step
  5. cas+tomcat+shiro实现单点登录-4-Apache Shiro 集成Cas作为cas client端实现
  6. PAD会取代PC吗
  7. Refused to set unsafe header "Connection"
  8. Xcode断点 中断不正常 每次断点都进入汇编
  9. 桌面应用之electron开发与转换
  10. PHP中ajax返回数据类型为JSON数据的处理
  11. MySQL union all排序问题
  12. JDK安装教程
  13. Linux vim常见使用详解
  14. vscode plugins
  15. D. Bicolorings
  16. hibernate中复合主键的使用
  17. zabbix系列(四)Zabbix3.0.4添加对Nginx服务的监控
  18. PAT甲题题解-1056. Mice and Rice (25)-模拟题
  19. iOS获取ipa素材、提取ipa资源图片文件
  20. 【java】 java SPI

热门文章

  1. javascript当中null和undefined的==和===的比较
  2. Linux07——安装MySQL
  3. JetBrains PyCharm 2018.2.1 x64永久激活码
  4. pods " xxxx" not found错误
  5. C语言当中int,float,double,char这四个有什么区别?
  6. 论STA | 工艺、工具、分析的本与末
  7. js将后台传入得时间格式化
  8. [AST Babel Plugin] Transform code, add line:column number for console log
  9. 查看KVM宿主机上虚拟机的IP的脚本
  10. php从接口获取数据转成可以用的数组或其他(含转换编码)