是否可以在Matlab代码中使用ssh在远程服务器中读取图像?
我的意思是,我想这样做,但是Matlab不允许:
image_file=strcat('sftp://user@ssh_server/user/images/image_name.tif');
imread(image_file);
我无需密码即可登录此ssh服务器。
最佳答案
假设您使用的是Linux / unix,则可以使用matlab中的scp
来获取文件,例如
!scp username@localhost:/tmp/source/test.png /tmp/
% please note ! at the beginning.
这将提示您输入密码。因此,如果需要,可以为passwordless scp命令设置公钥身份验证。
关于image - 使用matlab在ssh服务器中读取远程图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26517994/