2021-07-27
作者:互联网
SSH/SCP免密登录
sshpass
##sshpass安装
sudo apt install sshpass
##ssh免密登录
sshpass -p password ssh root@192.168.0.110
##scp 免密传输文件
#!/usr/bin/env bash
username="root"
password="root"
Taget_IP="192.168.0.110"
sshpass -p "password" scp -r $(srcfile) username@Taget_IP:$(taget_file)
标签:username,27,07,##,免密,2021,sshpass,password,root 来源: https://blog.csdn.net/wangpeng90824/article/details/119141932