Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 57

Thread: How can I connect to SFTP using Nautilus (Files)

  1. #41
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,784
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: How can I connect to SFTP using Nautilus (Files)

    Quote Originally Posted by dragonfly41 View Post
    Thank you. From the error messages, it seems that I can already connect. It's just that, once connected, Nautilus doesn't know what to do with it, almost as though the directory isn't a directory, and so it fails and disconnects.
    Quote Originally Posted by dragonfly41 View Post
    You wrote "I've managed to make the CLI commands work. It's only Nautilus that's giving me problems!"
    Can you open terminal from within Nautilus (right click on folder, Open terminal here) and then apply terminal commands?
    I've just tested and, yes, I can; but remember that the connection has already failed, so this is just the normal terminal.

    As a reminder from an earlier post, this specific server can be accessed via SFTP, but not SSH, by the host's design (probably not deliberately). (I have asked for SSH access, but they'll have to amend their systems to make it work, so it probably won't happen.)

    That's a bit confusing, because SFTP connects via SSH, so I don't know how they prevented us from accessing the host with SSH while allowing it with SFTP! Maybe something to do with the port, I don't know? As I say, preventing SSH was most likely unintentional, probably a side effect of however they created the virtual disk.
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  2. #42
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How can I connect to SFTP using Nautilus (Files)


  3. #43
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,784
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: How can I connect to SFTP using Nautilus (Files)

    Quote Originally Posted by dragonfly41 View Post
    Maybe!
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  4. #44
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How can I connect to SFTP using Nautilus (Files)

    Quote Originally Posted by Paddy Landau View Post
    Thank you. From the error messages, it seems that I can already connect. It's just that, once connected, Nautilus doesn't know what to do with it, almost as though the directory isn't a directory, and so it fails and disconnects.

    I've just tested and, yes, I can; but remember that the connection has already failed, so this is just the normal terminal.

    As a reminder from an earlier post, this specific server can be accessed via SFTP, but not SSH, by the host's design (probably not deliberately). (I have asked for SSH access, but they'll have to amend their systems to make it work, so it probably won't happen.)

    That's a bit confusing, because SFTP connects via SSH, so I don't know how they prevented us from accessing the host with SSH while allowing it with SFTP! Maybe something to do with the port, I don't know? As I say, preventing SSH was most likely unintentional, probably a side effect of however they created the virtual disk.
    Maybe someone [else also] did not want people to log in and run commands via ssh and therefore made the system only allow running sftp.
    Last edited by sudodus; August 1st, 2021 at 07:09 PM.

  5. #45
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How can I connect to SFTP using Nautilus (Files)

    Now I have just read about this approach .. reverse SSH tunnelling

  6. #46
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,904
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How can I connect to SFTP using Nautilus (Files)

    Quote Originally Posted by Paddy Landau View Post
    I decided to delete the old key, and recreate it from scratch, but this time without a password.
    You created that passphrase?? Should have said that.

  7. #47
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,904
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How can I connect to SFTP using Nautilus (Files)

    Quote Originally Posted by Paddy Landau View Post
    Now that you mention it, in all of its subdirectories, yes, but not in the "root" (home).
    Yes, because you're obviously in a SFTP-only jail.

    Quote Originally Posted by Paddy Landau View Post
    That shouldn't make a difference, though,
    But it does.

    Can we now please try that command of mine again?

    Code:
    sftp -P customport remoteuser@server:/path/to/location

  8. #48
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,784
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: How can I connect to SFTP using Nautilus (Files)

    Quote Originally Posted by dragonfly41 View Post
    Now I have just read about this approach .. reverse SSH tunnelling
    That's nice, but there's a catch-22. I can't SSH to the remote computer, but in order to set up the remote computer, I have to SSH to it. Hmm.
    Quote Originally Posted by scorp123 View Post
    You created that passphrase?? Should have said that.
    The the host's website created the initial key. So, to create the passphrase-less key, I deleted the initial key, created my own key, and the host's website uploaded the public key.
    Quote Originally Posted by scorp123 View Post
    Yes, because you're obviously in a SFTP-only jail. … But it does.
    OK.
    Quote Originally Posted by scorp123 View Post
    Can we now please try that command of mine again?
    This is interesting because it's confusing.

    When I run this command, it works.
    Code:
    $ sftp sg
    Connected to sg.
    sftp> pwd
    Remote working directory: /
    sftp> ls
    [shows list of subdirectories]
    But, I open ~/.ssh/config, and copy-and-paste its "sg" values into your command, and it fails! Square brackets indicate the copied values.
    Code:
    $ sftp -P [customport] [remoteuser]@[server]:
    [remoteuser]@[server]: Permission denied (publickey).
    Connection closed.
    Connection closed
    For the path, I've tried omitting it (as shown above); connecting to root (/); and connecting to a subdirectory that I know is there.

    It's strange. I have carefully checked that I copied-and-pasted the correct values, in full, and without extraneous characters, from ~/.ssh/config, so my brain says that it should be identical to "sftp sg". Clearly, I'm wrong!

    However, as I mentioned earlier, I seem to have made progress to the point where Nautilus can now connect. It's just that, once connected, Nautilus doesn't know what to do with it, almost as though the directory isn't a directory, and so it fails and disconnects.

    I think that all the help that I've received here has got to the point where we have a successful Nautilus connection; unfortunately, it has a failed "What do I do with this?" response from Nautilus.

    I downloaded and tried Thunar, and it gave a weirder result. It thought for a bit, then opened my password manager! Why — and how — does it do that? I have uninstalled Thunar.

    I think that, at this point, the question changes from "How do I connect using Nautllus?" to "How do I get Nautilus to understand what to do once connected?"

    I'm going to accept defeat on this one, because it's taking too much time, and I at least have access via FileZilla or the terminal.

    Thank you for all of your time and efforts.

    EDIT: See my next post…
    Last edited by Paddy Landau; August 2nd, 2021 at 09:26 AM. Reason: Clarification
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  9. #49
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,784
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: How can I connect to SFTP using Nautilus (Files)

    New information. I realised that the two sftp commands weren't identical, because I forgot to add the key. This works:
    Code:
    sftp -P [customport] -i ~/.ssh/[privatekey] [remoteuser]@[server]
    That one is identical to "sftp sg".
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  10. #50
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How can I connect to SFTP using Nautilus (Files)

    Re: reverse SSH tunnelling

    That's nice, but there's a catch-22. I can't SSH to the remote computer, but in order to set up the remote computer, I have to SSH to it. Hmm.
    I have not tried this myself but as I understand the article the general idea is not to SSH from local to remote, but rather the reverse (from remote to local) then slip in an SSH connection within that connection. Quite how you start this ping pong match I don't know.

Page 5 of 6 FirstFirst ... 3456 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •