Scp 使用Colab将文件发送到主机
我想使用scp共享一个Colab文件 我使用SSH-keygen创建了一个RSA密钥对。当我跑步时:Scp 使用Colab将文件发送到主机,scp,google-colaboratory,Scp,Google Colaboratory,我想使用scp共享一个Colab文件 我使用SSH-keygen创建了一个RSA密钥对。当我跑步时: !scp "/full/path/to/file" [user]@[host]:~/path/to/dest 我得到(没有密码提示): 经典答案如图所示,在此上下文中不起作用,因为colab环境不允许访问相关文件: !ssh-keygen -R [host] >>>do_known_hosts: hostkeys_foreach failed: No such file o
!scp "/full/path/to/file" [user]@[host]:~/path/to/dest
我得到(没有密码提示):
经典答案如图所示,在此上下文中不起作用,因为colab环境不允许访问相关文件:
!ssh-keygen -R [host]
>>>do_known_hosts: hostkeys_foreach failed: No such file or directory
!rm /home/USERNAME/.ssh/known_hosts
>>>rm: cannot remove '/home/USERNAME/.ssh/known_hosts': No such file or directory
!scp "/full/path/to/file" -o 'StrictHostKeyChecking no' [user]@[host]:~/path/to/dest
同样的
paramiko pip模块:永远面条,没有任何结果我不一定要使用scp
!ssh-keygen -R [host]
>>>do_known_hosts: hostkeys_foreach failed: No such file or directory
!rm /home/USERNAME/.ssh/known_hosts
>>>rm: cannot remove '/home/USERNAME/.ssh/known_hosts': No such file or directory
!scp "/full/path/to/file" -o 'StrictHostKeyChecking no' [user]@[host]:~/path/to/dest