Install sshpass Tool on ENV

本文介绍如何在不同环境中安装SSHPass工具,包括MAC、CentOS及Raspberry PI等平台,并提供了Docker环境下的安装步骤。此外,还介绍了如何验证安装是否成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Install sshpass Tool on ENV

Install on MAC
>wget https://gigenet.dl.sourceforge.net/project/sshpass/sshpass/1.06/sshpass-1.06.tar.gz

Unzip the file and configure make and make install. Here is how to verify the installation
> 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.

Install on CentOS
follow the same steps and commands.

Install On RaspberryPI
follow the same steps and commands

Docker ENV
+#install sshpass
+RUN curl -O https://gigenet.dl.sourceforge.net/project/sshpass/sshpass/1.06/sshpass-1.06.tar.gz
+RUN tar zxvf sshpass-1.06.tar.gz
+WORKDIR /install/sshpass-1.06
+RUN ./configure
+RUN make && make install
+WORKDIR /install/

We can execute command similar to this without prompt password
>sshpass -p xxxxx sftp -o StrictHostKeyChecking=no sillycat@sillycat.com:upload/test.xml ./4625.xml

References:
https://sourceforge.net/projects/sshpass/?source=typ_redirect
https://gist.github.com/arunoda/7790979
https://linux.cn/article-8086-1.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值