Your best friend for file transfer.

Fetch application logoFetch

SFTP connection hangs (8 posts)

  • Started 4 years ago by Dave
  • Latest reply 4 years ago from Scott McGuire
  • Dave Member

    I'm trying to use Fetch 5.5.3 to connect via SFTP to a Linux system. When I try the connection never completes and the last thing in the Fetch transcript is:

    Connecting to uuuuuu@xxx.yyy.zzz port 22 (2010-01-07 2:47 PM)
    SSH2_FXP_INIT 3

    I can use the command line sftp from Terminal on the Mac to connect to the system in question with no problem. This is Mac OS X 10.5.8 on a PowerPC iMac. Any ideas?

    Posted 4 years ago #

  • Scott McGuire Administrator

    Hi Dave,

    Just to confirm you are using the exact same hostname and username in both Fetch and the command-line SFTP, and you are doing both on the same Mac?

    What happens if you try to connect to the same server using the ssh command in Terminal, on the same Mac?

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 4 years ago #

  • Dave Member

    Same user and host, same Mac, ssh works fine. I looked at the messages log on the Linux host and found this corresponding to the Fetch connection:

    Accepted keyboard-interactive/pam for uuuuuu from n.n.n.n port 57735 ssh2
    subsystem request for sftp

    The same thing is logged when the sftp command connects to the host.

    Posted 4 years ago #

  • Scott McGuire Administrator

    Hi Dave,

    Thanks for the info.

    Fetch uses the command-line ssh to establish SFTP connections, so it's very unusual for Fetch to not be able to connect when the command-line ssh will.

    In order to figure out what's going on, we'd like to see logs of both Fetch's attempt to connect via SFTP, and the command-line sftp connection, so we can compare them and try to figure out the difference. Here's what to do.

    First, the Fetch log:

    * Open Fetch.
    * Hold down the Command, Option, Shift, and Control keys, and press D while you're holding them all down. (So all press five keys at once). This will enable the Fetch Debug menu.
    * Go to the Debug menu, choose Logging, and choose SFTP log.
    * Try to connect to your server.
    * Click the desktop background to select the Finder.
    * Choose "Home" from the Go menu in the Finder
    * Open the Library folder
    * Open the Logs folder
    * Find the file named "Fetch.log"
    * Attach it to an email message to bugs@fetchsoftworks.com

    Note that the Fetch.log file may be large; you may want to compress it before attaching it to the email.

    Next, the command line sftp log:

    * Open the Terminal application.
    * At the prompt, type:

    sftp -v your-username@your-server-address

    * Replace "your-username" and "your-server-address" with your username and the hostname (or IP address) for your server, respectively.
    * And then press the Return key.
    * Some debugging information will be printed.
    * Then you will be prompted to enter your password; enter your password and press the Return key.
    * More debugging information will be printed.
    * Then please copy the entire output, starting from the beginning, and paste it into an email message to bugs@fetchsoftworks.com (this can be the same email as the one you attach the Fetch.log to, if you want).
    * Then you can exit the command-line sftp client.

    We'll take a look and try to figure out what's going on.

    Please let me know if you have any questions about or problems with the above.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 4 years ago #

  • Dave Member

    I've found the problem. The users for my Fetch and sftp command tests were not the same, which explains the discrepancy there. When I used the same user with the command it failed as well. The sftp -v logging revealed this error:

    Received message too long 1416127858

    The .bashrc on that user sends something to the terminal when it logs in and that breaks sftp -- it apparently treats the first 4 characters as a binary message length. Convert 1416127858 to hex and you get 54686572 which is "Ther" which is the start of the text. Without the -v logging sftp justs hangs with no explanation, so I assume that causes Fetch to do the same.

    Thanks for your help!

    Posted 4 years ago #

  • Scott McGuire Administrator

    Hi Dave,

    You're welcome - I'm glad to hear you found the source of the problem. So just to confirm, you're all set and Fetch is connecting via SFTP now?

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 4 years ago #

  • Dave Member

    It's working with the user that isn't typing on the terminal at login. In that case Fetch fails the same way the sftp command fails. I need to fix that user to not do that during sftp connections. It sounds to be like a bug in sftp -- it should at least return an error instead of hanging.

    Posted 4 years ago #

  • Scott McGuire Administrator

    Hi Dave,

    Okay, thanks for the clarification.

    I agree it sounds like probably ssh should return an error. But unfortunately that's out of our control (Fetch is just a victim of it).

    Please let us know if you have further questions.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 4 years ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.