In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
I believe that most people do not know how to use the sshpass command shared in this article. In order to let you learn, I have summarized the following contents. Without saying much, let's read on.
The sshpass command uses the
1. Directly connect the host remotely.
Sshpass-p 'password' ssh root@192.168.100.11
2. Specify the port of ssh for remote connection.
Sshpass-p 'password' ssh-p 2222 ssh root@192.168.100.11
3. Read the password file as the password to remotely connect to the host.
Sshpass-f passwd.txt ssh root@192.168.100.11
4. Pull the file to the local on the remote host
Sshpass-p 'password' scp root@192.168.100.11:/ remote directory / / local directory /
5. Copy the local directory file to the remote directory
Sshpass-p 'password' scp / local directory / root@192.168.100.11:/ remote directory /
6. Copy the local directory files to the designated port of the remote directory
Sshpass-p 'password' scp-P 2222 / local directory / root@192.168.100.11:/ remote directory /
7. Connect the host remotely and execute the command
Sshpass-p 'password' ssh-o StrictHostKeyChecking=no root@192.168.100.11'rm-rf / tmp/test'
-o StrictHostKeyChecking=no: ignore password prompts
The above is the use of the sshpass command, the detailed use of their own use to know the specific essentials. If you want to read more related articles, you are welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.