是否可以在matlab代码中使用ssh读取远程服务器中的图像?
我的意思是,我想这样做,但Matlab不允许:
image_file=strcat('sftp://user@ssh_server/user/images/image_name.tif');
imread(image_file);
我可以在没有密码的情况下登录此ssh服务器。
答案 0 :(得分:1)
假设您使用linux / unix,可以使用matlab中的scp
来获取文件,例如
!scp username@localhost:/tmp/source/test.png /tmp/
% please note ! at the beginning.
这将提示您输入密码。因此,如果需要,可以为passwordless scp命令设置公钥验证。