SSH (SFTP) unable to setup the default directory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • intersol
    Enthusiast
    • Apr 2006
    • 44

    SSH (SFTP) unable to setup the default directory

    It seems that it's impossible to configure the default directory for SSH / SFTP connections.

    This is a critical problem because by default the browser does not allow you to browse outside the default directory.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    Thanks for the feedback. Defining an initial path as part of the profile is on our wishlist. In the meantime, if you use the path syntax: "sftp://user@ip/subfolder" or "profilerofile name?subfolder/" you can save a Session with a specified initial path.
    Aaron P Scooter Software

    Comment

    • intersol
      Enthusiast
      • Apr 2006
      • 44

      #3
      I does not work with profile:ABC?/etc

      Also, really unhappy about getting this an loosing the body of the post:

      Your submission could not be processed because a security token was missing or mismatched.

      If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16002

        #4
        Hello,

        You would not use a ?/. Instead it is ?ImmediateSubName/. For an example of the syntax, you can load the base folder, select a subfolder, then right click and Set As Base Folder. Then note the new path syntax that includes the subfolder name.

        The forum error you ran into is a vBulletin issue if you leave a tab open for longer than a cached time limit. To help prevent running into it, please issue a Refresh command on the open window before you attempt to Reply/post. It's an unfortunate vBulletin limitation; one I run into myself now and then while administering the forum.
        Aaron P Scooter Software

        Comment

        • jackey666
          Visitor
          • Aug 2014
          • 5

          #5
          I have the same issue on my side, but it's an SFTP connection error. The connection was refused due to an incorrect login.

          Same settings works in terminal or in another software.

          2014-08-14 14:55:17 Password authorization failed.
          2014-08-14 14:55:17 No more authentication methods available

          Comment

          • jackey666
            Visitor
            • Aug 2014
            • 5

            #6
            Here's the log from the SSH server. I also tried using a private SSH key and by using user/password but I get an incorrect username/password.

            With private key
            -------------------------------
            Aug 20 11:56:24 server1 sshd[14511]: Accepted publickey for dev from xxx.xxx.xxx.xxx port 58547 ssh2
            Aug 20 11:56:24 server1 sshd[14511]: pam_unix(sshd:session): session opened for user dev by (uid=0)
            Aug 20 11:56:24 server1 sshd[14513]: subsystem request for sftp by user dev
            Aug 20 11:56:26 server1 sshd[14513]: Received disconnect from xxx.xxx.xxx.xxx: 11: disconnected by user
            Aug 20 11:56:26 server1 sshd[14511]: pam_unix(sshd:session): session closed for user dev
            Aug 20 11:56:43 server1 sshd[14519]: Connection closed by xxx.xxx.xxx.xxx [preauth]

            With username/password
            -------------------------------
            Aug 20 11:59:16 server1 sshd[14669]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=my.remotehost.com user=dev
            Aug 20 11:59:17 server1 sshd[14669]: Failed password for dev from xxx.xxx.xxx.xxx port 58624 ssh2
            Aug 20 11:59:17 server1 sshd[14669]: Connection closed by xxx.xxx.xxx.xxx [preauth]

            Comment

            • Aaron
              Team Scooter
              • Oct 2007
              • 16002

              #7
              Hello,

              For this log, it looks like you have an FTP Profile with a Private/Public key, but also have a Password Saved. Please make sure in the Profiles dialog, in your specific profile, that "Save Password" is disabled, even if you have a blank password in the text entry.

              If this is configured, we'll want to step through and make sure the Profile is configured correctly. Are you able to connect to this SFTP server using another client, like Filezilla? This would help verify that it is configured to work as an SFTP and not just SSH.
              Aaron P Scooter Software

              Comment

              • jackey666
                Visitor
                • Aug 2014
                • 5

                #8
                So after testing a lot, we found out that the password had some trick in it. So it working fine. Sorry for the misunderstanding...

                As for the SSH key, I found out that Beyond Compare doesn't support the default OpenSSH key created by Linux or OSX (in DSA). I have a key generate by openSSH which works on many Linux servers, but it seems like beyond compare only support its own (Putty).

                Is there a way to fix this?

                Comment

                • Aaron
                  Team Scooter
                  • Oct 2007
                  • 16002

                  #9
                  Hello,

                  Are you finding that all OpenSSH keys are failing? Would you be able to generate a key pair and email them to us at [email protected] with a link back to this forum thread for our reference?

                  We've had some issues with specific OpenSSH private/public pairs, but re-generating often provides a working key.
                  Aaron P Scooter Software

                  Comment

                  • jackey666
                    Visitor
                    • Aug 2014
                    • 5

                    #10
                    Hi,

                    I just tried to regenerate openSSH private/public pairs and it works fine. However, my current key is used on more than 10 linux servers and changing all of then would be a pain...

                    If it can help, my original SSH key has the option DES-EDE3-CBC encryption in the private file, which the new private doesn't have. The key was generate many months/years ago so I can't remember where it was generate, but it works on Linux and OSX SSH connection, and connecting to Linux SFTP using OSX console.

                    Comment

                    • embsysdev
                      Visitor
                      • Jan 2012
                      • 4

                      #11
                      SFTP (SSH2) was previously working for me, now I'm getting "Folder Not Available" dialog and error 103 in the BC log. SSH from within Ubuntu terminal works no issues, before and after the problem with BC4. I haven't done any ssh-keygen, just using name+password. Also tried deleting and recreating the ftp profile, no joy.

                      If I reset all BC4 settings and start fresh, would it fix this? If yes, how do I do that?

                      Client:
                      BC 4.0.5 build 19480 for Linux, running on Ubuntu 14.0.4 x64 LTS.

                      Server:
                      Raspberry Pi B+ over wired Ethernet.
                      Code:
                      Server ssh version info (ssh -V) : OpenSSH_6.0p1 Debian-4+deb7u2, OpenSSL 1.0.1e 11 Feb 2013
                      BC4 log:
                      Code:
                      02/13/2015 02:26:32 AM  Username: user
                      02/13/2015 02:26:32 AM  Load comparison:  <-> 
                      02/13/2015 02:26:36 AM  Connecting to 192.168.1.135
                      02/13/2015 02:26:36 AM  Server key [ssh-rsa 2040 be:2c:65:dd:92:06:29:ca:77:34:8b:2f:df:df:b1:23]
                      02/13/2015 02:26:36 AM  Public key authorization failed.
                      02/13/2015 02:26:36 AM  Public key agent authorization failed.
                      02/13/2015 02:26:41 AM  Authorization successful.
                      02/13/2015 02:26:42 AM  Connection failed: Failed to establish SFTP connection (error code is 103)
                      02/13/2015 02:26:42 AM  Connection closed.
                      02/13/2015 02:26:42 AM  Unable to load sftp://[email protected]//root: Failed to establish SFTP connection (error code is 103)
                      02/13/2015 02:26:42 AM  Load comparison:  <->
                      Server /var/log/auth.log:
                      Code:
                      Feb 13 02:21:49 rube-info sshd[2448]: Accepted password for root from 192.168.1.136 port 60601 ssh2
                      Feb 13 02:21:49 rube-info sshd[2448]: pam_unix(sshd:session): session opened for user root by (uid=0)
                      Feb 13 02:21:49 rube-info sshd[2448]: subsystem request for sftp by user root
                      Feb 13 02:21:49 rube-info sshd[2448]: Received disconnect from 192.168.1.136: 11: Connection closed
                      Feb 13 02:21:49 rube-info sshd[2448]: pam_unix(sshd:session): session closed for user root
                      Last edited by embsysdev; 13-Feb-2015, 03:35 AM.

                      Comment

                      • Aaron
                        Team Scooter
                        • Oct 2007
                        • 16002

                        #12
                        Thanks.

                        Would it be possible to get a test account to your FTP server? If so, you can email us at [email protected]
                        Are you able to reproduce the issue without a Public/Private Key defined as part of the profile?
                        Aaron P Scooter Software

                        Comment

                        • embsysdev
                          Visitor
                          • Jan 2012
                          • 4

                          #13
                          Originally posted by Aaron
                          Would it be possible to get a test account to your FTP server?
                          Are you able to reproduce the issue without a Public/Private Key defined as part of the profile?
                          The server is a Raspberry Pi, it's not connected to the public internet, just on my firewalled network, so can't give you a test account, but you can buy a Raspberry Pi for $35 and test it yourself. The issue is with user/pw only, no keys. Password and private key fields are blank in the profile.

                          Comment

                          • embsysdev
                            Visitor
                            • Jan 2012
                            • 4

                            #14
                            It was a server config issue, my bad. Resolved by editing /etc/ssh/sshd_config.
                            Changed "Subsystem sftp /usr/lib/openssh/sftp-server" to "Subsystem sftp internal-sftp".

                            Comment

                            Working...