Created attachment 3508 [details] screenshot of the bug on debian 10 with 7.9p1 "ssh debian@vps-1060b8b0.vps.ovh.net" resolve properly BUT "ssh debian@vps-1060b8b0.vps.ovh.net:22" doesn't : "ssh: Could not resolve hostname vps-1060b8b0.vps.ovh.net:22" It works using -p "ssh debian@vps-1060b8b0.vps.ovh.net -p 22" resolve properly PROBLEM: nodejs modules (for exemple) use the user@host:port methode. ALSO TESTED ON Windows 10 with 8.1p1 and 7.7p1 Can't
Also can't resolve the format ip:port
(In reply to loic.did from comment #0) [...] > "ssh debian@vps-1060b8b0.vps.ovh.net:22" doesn't : > "ssh: Could not resolve hostname vps-1060b8b0.vps.ovh.net:22" Why do you think that should work? It's not a valid DNS name and ssh(1) does not list it as a supported way of specifying the port). If you want to use the URI syntax that does allow a port after a colon you need to specify the "ssh:" scheme prefix (this was added in OpenSSH 7.6): ssh ssh://debian@vps-1060b8b0.vps.ovh.net:22 > PROBLEM: > nodejs modules (for exemple) use the user@host:port methode. If nodejs is invoking ssh in a way that's not supported that sounds like a problem with nodejs. You could configure around it by adding something like this to your ~/.ssh/config file: Host vps-1060b8b0.vps.ovh.net:22 Hostname vps-1060b8b0.vps.ovh.net Port 22
Created attachment 3509 [details] Forget This one I just check the man page to understand why it didn't work
As you said I configured 3 node modules with: host: debian@vps-1060b8b0.vps.ovh.net port: 22 Trigger the so called bug. The "ssh ssh://debian@vps-1060b8b0.vps.ovh.net:22" does work but not sure I can get a use of it since I can also use the arguement P but not used by the nodejs modules. Anyway I found a node module that works (at least for the connection). And as you said the host:port format can only be used while following ssh:// it's written on the man page but as I don't have man installed I used the help that doesn't provide the format. The help isn't really helpful since I can't understand much with it but it's my fault to not have checked the man page before posting. I think the help needs and update to provide more information since I think I'm not the only that have or will have this problem. Sorry that I took your time for that.
The help (and synopsis) say: usage: ssh [...] destination [command] and the man page expands on what format the destination can take: ssh connects and logs into the specified destination, which may be specified as either [user@]hostname or a URI of the form ssh://[user@]hostname[:port] The man page is about 50KB so there's a limit to how much of it we can cram into the usage and synopsis.
closing bugs resolved before openssh-8.9