Solved I cant jump ssh

ssh -J pal@server_ip:11954 pal@10.44.5.11:11954

channel 0: open failed: connect failed: Name does not resolve
stdio forwarding failed
Connection closed by UNKNOWN port 65535

But from server it works:
ssh -p 11954 pal@10.44.5.11
pal@10.44.5.11's password:
Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 6.5.0-45-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro

Expanded Security Maintenance for Applications is not enabled.

37 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

6 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm

New release '24.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Code:
ssh -J pal@server_ip:11954 pal@10.44.5.11:11954

channel 0: open failed: connect failed: Name does not resolve
stdio forwarding failed
Connection closed by UNKNOWN port 65535
 
I connect to server without problems
Code:
ssh -p 11954 pal@xxx.xxx.xxx.xxx

(pal@xxx.xxx.xxx.xxx) Password for pal@cel:

Last login: Thu Feb 20 10:09:22 2025 from 10.44.5.11

FreeBSD 14.2-RELEASE-p1 GENERIC


Welcome to FreeBSD!


Release Notes, Errata: https://www.freebsd.org/releases/

Security Advisories:   https://www.freebsd.org/security/

FreeBSD Handbook:      https://www.freebsd.org/handbook/

FreeBSD FAQ:           https://www.freebsd.org/faq/

Questions List:        https://www.freebsd.org/lists/questions/

FreeBSD Forums:        https://forums.freebsd.org/


Documents installed with the system are in the /usr/local/share/doc/freebsd/

directory, or can be installed later with:  pkg install en-freebsd-doc

For other languages, replace "en" with a language code like de or fr.


Show the version of FreeBSD installed:  freebsd-version ; uname -a

Please include that output and any error messages when posting questions.

Introduction to manual pages:  man man

FreeBSD directory layout:      man hier
 
Please, BBCodes are your friends, it makes things easier to read for everybody.


Thank you.
 
Code:
ssh -J pal@server_ip:11954 pal@10.44.5.11:11954

channel 0: open failed: connect failed: Name does not resolve
stdio forwarding failed
Connection closed by UNKNOWN port 65535

But from server it works:
Code:
ssh -p 11954 pal@10.44.5.11
You should use the regular -p flag, why would you use the trailing :11954?
It perfectly works here with my custom ports.
 
Really?
What's the output of this?
Code:
ssh -J -p11954  pal@server_ip:11954 pal@10.44.5.11
Code:
ssh -J -p11954 pal@xxxxxc:11954 pal@10.44.5.11

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[ort]] [-L address]

           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]

           [-Q query_option] [-R address] [-S ctl_path] [-W hostort]

           [-w local_tun[:remote_tun]] destination [command [argument ...]]

kex_exchange_identification: Connection closed by remote host

Connection closed by UNKNOWN port 65535
 
As I mentioned above, here I have my custom port set in all the hosts in both
/etc/ssh/sshd_config
and
/etc/ssh/ssh_config
Port 11954
Thus I don't need to mention ports in the command.
If your question is about accessing certain hosts via another server "automatically", the man page ssh() suggests:
This is a shortcut to specify a ProxyJump configuration directive ... Use ~/.ssh/config to specify configuration for jump hosts
I haven't used it, but there are many examples in the Internet, e.g. "ssh proxyjump command to config file".
 
Back
Top