Transfer files Using sshpass

#! /bin/bash

user=root

password=12345678

remote_ip=192.168.3.140

remote_dir=/usr/bin/

local_file_dir=./

local_file_name=gps

#sshpass -p 12345678 scp -r autoconnecttool root@192.168.3.140:/

sshpass -p $password scp -r $local_file_dir$local_file_name $user@$remote_ip:$remote_dir

posted @ 2018-12-17 11:00  嵌入式实操  阅读(124)  评论(0编辑  收藏  举报