sftp stream using keyfile

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Entropy0
New Cone
New Cone
Posts: 4
Joined: 24 Jan 2016 23:16

sftp stream using keyfile

Postby Entropy0 » 24 Jan 2016 23:36

I'm looking for a way to open a stream via sftp using a keyfile (as opposed to the usual user:password prompt vlc opens by default), but can't seem to find any documentation about this whatsoever.

I'm tring to do something like

Code: Select all

vlc -i .ssh/key "sftp://user@remote.host/path/to/file/"
I know I could do

Code: Select all

ssh -i .ssh/key user@remote.host "cat /path/to/file" | vlc -
, but that wouldn't enable me to control the stream (beyond play/pause). (Also, it's kind of an ugly solution)
Simply downloading the file also isn't an option, since it isn't a given that recording to file has finished when I start playback.


Any ideas? :/

Rémi Denis-Courmont
Developer
Developer
Posts: 15213
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: sftp stream using keyfile

Postby Rémi Denis-Courmont » 25 Jan 2016 01:04

Check the libsftp documentation. Not sure if this is possible at all.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Entropy0
New Cone
New Cone
Posts: 4
Joined: 24 Jan 2016 23:16

Re: sftp stream using keyfile

Postby Entropy0 » 25 Jan 2016 12:25

I'm not sure where to look for that - "libsftp" doesn't produce any useful results in google whatsoever (and neither does "lib sftp") and "gnome-vfs", which apparently provides the libsftp.so on my system doesn't have a good documentation either.
But even if I was able to find documentation on the underlying library that vlc uses - how would I pass any calls to it? When using the sftp command I could just give the argument -o "IdentityFile=/.ssh/key", which of course isn't a valid option in vlc. Not that I would have to do that when using the sftp command line utility - it correctly uses a key according to ssh_config/ keys added via ssh-add/ defaults to .ssh/id_protocol.
So, yes - it should be possible in general - whether vlc supports this however seems questionable at this point :/

Rémi Denis-Courmont
Developer
Developer
Posts: 15213
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: sftp stream using keyfile

Postby Rémi Denis-Courmont » 25 Jan 2016 14:38

Sorry, that's libssh2.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Entropy0
New Cone
New Cone
Posts: 4
Joined: 24 Jan 2016 23:16

Re: sftp stream using keyfile

Postby Entropy0 » 02 Feb 2016 18:39

Well, I can't figure out how to do this (or if it is indeed possible at all), but I found a solution for my usecase: sshfs. Just mount the remote directory with sshfs using the keyfile and voila - vlc can open the remote files as local via fuse.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 4 guests