用matlab在ssh服务器中读取远程图像 [英] reading remote images in ssh server with matlab
本文介绍了用matlab在ssh服务器中读取远程图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用matlab代码中的ssh读取远程服务器中的图像?
Is it possible to read an image in a remote server with ssh in a matlab code?
我的意思是,我想这样做,但是Matlab不允许:
I mean, I want to do this, but Matlab is not allowing:
image_file=strcat('sftp://user@ssh_server/user/images/image_name.tif');
imread(image_file);
我可以在没有密码的情况下登录这个ssh服务器。
I can login in this ssh server without password.
推荐答案
假设您使用linux / unix,可以使用matlab中的 scp
来获取文件,例如
Assuming that you are on linux/unix, you can use scp
from matlab to fetch the file, e.g.
!scp username@localhost:/tmp/source/test.png /tmp/
% please note ! at the beginning.
这将提示您输入密码。因此,如果需要,您可以为无密码 scp命令。
This will prompt you for password offcourse. Thus, if you want, you can setup public-key authentication for passwordless scp command.
这篇关于用matlab在ssh服务器中读取远程图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文