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
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

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

被折叠的 条评论
为什么被折叠?



