Closed ronald-willems closed 5 years ago
@ronaldwillems74 The code -21 means LIBSSH2_ERROR_CHANNEL_FAILURE. That is, the ssh2 communication failed, I guess. I want to know more detail information. Could you give me the debug log on the Console tab of the DevTools by the following steps? https://github.com/yoichiro/chromeos-filesystem-sftp/wiki/How-to-Capture-the-Console-Log-of-DevTools
I have some trouble capturing the complete log. Does this help:
One more thing. I'm trying to use this with my Synology NAS. ssh does not seem to be completely standard: BusyBox v1.16.1 (2015-05-11 02:52:35 CST) built-in shell (ash) Enter 'help' for a list of built-in commands.
DiskStation>
I have a Synology DS213j that I have some (limited) success accessing from my Chromebook using this SFTP project. I've not been able to keep the SFTP connection alive long enough to do big transfers -- I'm not sure why yet, but I'll file another bug if I can track it down a bit. I found the SMB project by @yoichiro stayed connected for me much longer, but had problems with a file >2GB. In any event, I'm grateful that he has made these projects!
Like @ronaldwillems74, my Synology also has BusyBox v1.16.1, but that is just the command line shell, not the sshd (SSH service).
The sshd appears standard:
OpenSSH_6.6p2-hpn14v4, OpenSSL 1.0.1o-fips 12 Jun 2015
@ronaldwillems74: your sshd version string can be obtained by running sshd -V
(sshd with a nonexistent option like -V
prints the version and usage information).
Here's how you can get server-side ssh/sftp debugging info:
/usr/bin/sshd -p 2222 -dd
sshd
command from the NAS ssh shell windowWhen I did this, I also get the error message on the ChromeOS "Unable to init SFTP session -21 11". In the NAS shell window running sshd
, the important messages appear to be:
debug1: session_input_channel_req: session 0 req subsystem debug2: subsystem request for sftp by user david debug1: skip sftp subsytem since sftp port is not matched subsystem request for sftp by user david failed, subsystem not found
Aha! That's helpful.
(Note: you probably have to cancel your special sshd
by typing Ctrl-C
in the ssh shell window.)
I went back to the NAS web GUI, opened its Control Panel, the File Services panel, and the FTP tab. Further down that page, there is an SFTP section. I have the checkbox checked to enable the SFTP service, with the port set to 22 (the standard ssh port).
Indeed, when I try an SFTP connection to port 22 (as usual; we just used 2222 for debugging), it mounts fine, first try. I remember I had to enable SFTP on the Synology when I first started playing with it last night.
I'm guessing you don't have SFTP enabled on your NAS -- see two paragraphs above for how to enable it. Let us know if that fixes it; if so, this issue can probably be closed.
Hi,
Sorry for the late reply. The problem was indeed that I didn't have SFTP enabled. How foolish.. I didn't know it required an extra action...
Thanks a lot for your help. It works like a charm so far.
@ronaldwillems74 : Good to know it works for you now! I don't think missing those buried details is foolish; it's not at all obvious.
Seems like this issue can be closed now.
Hi,
I am trying to use this app for my Synology. However, when I try to connect I run into the following error: Unable to init SFTP Session -21 11
Does anyone have a suggestion what might be the cause?
Kind regards, Ronald