Results 1 to 3 of 3

Thread: SFTP into one server via another?

  1. #1
    Join Date
    May 2005
    Location
    Windsor, Ontario, Canada
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    SFTP into one server via another?

    Hello -

    I have three machines:

    DESKTOP

    SERVER1, which only accepts ssh from...

    SERVER2

    Currently I can ssh into SERVER1 "directly" with this command from a terminal on DESKTOP:

    ssh -t my_username@SERVER2 ssh my_username@SERVER1

    I would like, however, to access SERVER1 using Nautilus on DESKTOP. Normally I'd click "Other Locations" and input sftp://my_username@SERVER_IP. Does anyone know the correct command to input into Nautilus that would effectively log me into SERVER1 via SERVER2 like my ssh command does?

    Thanks!
    Last edited by uc50_ic4more; August 12th, 2020 at 06:34 PM.
    --
    uc50_ic4more

  2. #2
    Join Date
    May 2005
    Location
    Windsor, Ontario, Canada
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: SFTP into one server via another?

    As usual, 30 seconds after posting here I found the solution. For those interested:

    In ~/.ssh/config:

    Host SERVER1
    HostName SERVER1_IP
    User my_username
    Port 22
    IdentityFile ~/.ssh/my_key
    IdentitiesOnly yes
    ProxyCommand ssh -W %h:%p SERVER2
    ForwardAgent yes

    Host SERVER2
    HostName SERVER2_IP
    User my_username
    Port 22
    IdentityFile ~/.ssh/my_key
    IdentitiesOnly yes

    In Nautilus I simply entered ssh://my_username@SERVER1
    --
    uc50_ic4more

  3. #3
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    20,968
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: SFTP into one server via another?

    I would use X11 forwardng:
    Code:
    ssh -X my_username@SERVER2 nautilus  &
    Or better, rsync.

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
  •