Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

OpenSsh: Multi Hop command not working (ssh -J)

  • 14-10-2019 10:19am
    #1
    Registered Users, Registered Users 2 Posts: 5,659 ✭✭✭


    Running the below command from my git bash on local laptop to enable port forwarding 2 hops away. Purpose of same is to allow me to access web results from address2 to view on my laptop.

    I can only currently access by sshing to address1 and onwards to address2.

    Here is the output.
    $ ssh -D 9999 -J root@address1.company.com root@address2.company.com
    ssh: Could not resolve hostname address1.company.com: Name or service not known
    kex_exchange_identification: Connection closed by remote host
    

    I can't see why this is as address1 (name changed to protect the innocent) is ssh'able directly without args.

    Seems to happen even without the second hop listed.
    $ ssh -D 9999 -J root@address1.company.com
    usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
               [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
               [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
               [-i identity_file] [-J [user@]host[:port]] [-L address]
               [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
               [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
               [-w local_tun[:remote_tun]] destination [command]
    
    My version of openssh is 8.0 so it should have the -J option working

    linux bash ssh portforwarding openssh


Advertisement