We use a special ssh proxy which forces me to connect to servers using this syntax: ssh myuser@[email protected]@crappysshproxy.sub.domain
.
Btw: this proxy is called PSMP and belongs to the CyberArk product suite, it is not a jump or bastion host, although is seems to be similar because I do not have direct access to the servers and only the proxy is reachable.
To shorten this I tried the following ~/.ssh/config
:
Host server
HostName privilege[email protected]@crappysshproxy.sub.domain
User myuser
Why I then do ssh server
I get ssh: Could not resolve hostname [email protected]@crappysshproxy.sub.domain: Name or service not known
.
I tried to add these ...
CheckHostIP no
VerifyHostKeyDNS no
... to my ssh config and this ...
UseDNS no
... to the global ssh config.
Can I keep ssh from doing a DNS lookup and make it just use User
+HostName
for connections ?
I am not searching for a solution that makes me create shortcut bash scripts like server.sh
that does the concatenation for me and I do not want to alias / replace the ssh command.
HostName crappysshproxy.sub.domain
andUser myuser@[email protected]
? I'm fairly sure ssh will splituser@host
on the last@
, so I think that's equivalent to your ssh command-line that works.ssh
are created withpublickey -o PasswordAuthentication=no
automatically and this interferes (btw: no, I can not use keys for now ;-)) with my other settings. I will check this and update my questionssh server
worked from the shell but Ansible adds more commands. So I had to add--ask-pass
to my Ansible command line. This then worked.