阅读量:0
首先获取sudo无密码登陆
安装sshpass:sudo apt-get install sshpass
QProcess上传:
QStringList cmd;
QString str ="sudo sshpass -p '123456' scp tmp.txt hostname@192.168.1.111:/home/hostname"
cmd<<"-c"<<str
QProcess process;
process.start("/bin/bash",cmd);
首先获取sudo无密码登陆
安装sshpass:sudo apt-get install sshpass
QProcess上传:
QStringList cmd;
QString str ="sudo sshpass -p '123456' scp tmp.txt hostname@192.168.1.111:/home/hostname"
cmd<<"-c"<<str
QProcess process;
process.start("/bin/bash",cmd);
为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!