Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ls/2 hangs #16

Open
andrelip opened this issue Oct 31, 2018 · 3 comments
Open

ls/2 hangs #16

andrelip opened this issue Oct 31, 2018 · 3 comments

Comments

@andrelip
Copy link

andrelip commented Oct 31, 2018

I've used sftp_ex with no issue at all in the past. But now I can connect to the server but every other operation hangs. Same behaviour with ssh_sftp.start_channel/3 and list_dir/3. The shell hangs forever or I receive a timeout if ssh_sftp receives the optional parameter. Using filezilla it loads in 3 seconds. The root folder only have 9 folders. Connecting to the same server through ftp works fine with :ftp. Any clue?

Filezilla trace (logger level 4)

Command:	open "(ommited).exavault.com" 22
Trace:       	Server version: SSH-2.0-mod_sftp
Trace:       	Using SSH protocol version 2
Trace:       	Doing ECDH key exchange with curve nistp256 and hash SHA-256
Trace:       	Host key fingerprint is:
Trace:       	ssh-rsa 2048 0e:ce:3e:a2:be:7e:45:1f:0b:dd:c5(ommited)
Command:	Trust new Hostkey: Once
Trace:       	Initialised AES-256 SDCTR client->server encryption
Trace:       	Initialised HMAC-SHA-256 client->server MAC algorithm
Trace:       	Initialised AES-256 SDCTR server->client encryption
Trace:       	Initialised HMAC-SHA-256 server->client MAC algorithm
Trace:       	Pageant is running. Requesting keys.
Trace:       	Pageant has 0 SSH-2 keys
Command:	Pass: **************
Trace:       	Sent password
Trace:       	Access granted
Trace:       	Opening session as main channel
Trace:       	Opened main channel
Trace:       	Started a shell/command
Status:      	Connected to arvoredelivros.exavault.com
Trace:       	CSftpControlSocket::ConnectParseResponse()
Trace:       	CSftpControlSocket::ResetOperation(0)
Trace:       	CControlSocket::ResetOperation(0)
Status:      	Retrieving directory listing...
Trace:       	CSftpControlSocket::SendNextCommand()
Trace:       	CSftpControlSocket::ChangeDirSend()
Command:	pwd
Response: 	Current directory is: "/"
Trace:       	CSftpControlSocket::ResetOperation(0)
Trace:       	CControlSocket::ResetOperation(0)
Trace:       	CSftpControlSocket::ParseSubcommandResult(0)
Trace:       	CSftpControlSocket::ListSubcommandResult()
Trace:       	CSftpControlSocket::SendNextCommand()
Trace:       	CSftpControlSocket::ListSend()
Command:	ls
Status:      	Listing directory /
Trace:       	CSftpControlSocket::ListParseResponse()
Trace:       	CSftpControlSocket::ResetOperation(0)
Trace:       	CControlSocket::ResetOperation(0)
Status:      	Directory listing of "/" successful
@jocyvanpg
Copy link

Hey @andrelip, do you solved that?

@andrelip
Copy link
Author

andrelip commented Jun 7, 2019

@jocyvanpg No. I had to fork ExFtp to use in my pipeline.
https://github.com/andrelip/exftp

@DerTim1
Copy link

DerTim1 commented Jul 8, 2021

Using SftpEx.connect/1 with option sftp_svn: 3 may solve this problem for some sftp hosts, showing this behaviour. Due to an other hint, this is an issue because the client is choosing version 4 and old host implementation using version 3.

https://elixirforum.com/t/no-response-from-ssh-sftp-list-dir-2-when-given-path-other-than-root/25130/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants