是否可以在Matlab代码中使用ssh在远程服务器中读取图像?
我的意思是,我想这样做,但是Matlab不允许:
image_file=strcat('sftp://user@ssh_server/user/images/image_name.tif');
imread(image_file);
我无需密码即可登录此ssh服务器。
假设您使用的是Linux / unix,则可以使用scp
matlab来获取文件,例如
!scp username@localhost:/tmp/source/test.png /tmp/
% please note ! at the beginning.
这将提示您输入密码。因此,您可以根据需要为无密码的scp命令设置公钥身份验证。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句