|
设备上向linux 服务器copy文件:
scp /home/toybrick/scptest.txt rockchip@192.168.0.242:/home
从本地复制文件夹到服务器
scp -r /home/toybrick/ rockchip@192.168.0.242:/home
设备从linux 服务器上copy文件:
scp rockchip@192.168.0.242:/home:/data/test.txt /home/toybrick/
设备从linux 服务器上copy文件夹:
scp -r rockchip@192.168.0.242:/home/rockchip/scp_uvc_app /home/toybrick/
Permission denied (publickey)问题解决方法:
1. 修改/etc/ssh/sshd_config
PasswordAuthentication no 改为PasswordAuthentication yes
2. 重启服务: systemctl restart ssh.service
免密传输文件方法:
1. 设备上制作密钥: ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/ssh/id_rsa): #回车
Enter passphrase (empty for no passphrase): #回车
Enter same passphrase again: #回车
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
2. 将当前Linux主机上的id_rsa.pub文件拷贝到远程Linux主机的root用户目录下的.ssh目录下,并且改名为authorized_keys 。若已经有该文件覆盖掉内容即可。
3. 重启服务: systemctl restart ssh.service
|
|