Hello.
I need to jump over a custom ssh-relay software to get to my destination host.
For example, to get to be "root@target", I would need to call ssh like this:
ssh -p 2222 -t blindcoder@sshrelay root@target
blindcoder@sshrelay's password: ***
root@target:~#
To simplify this, I added the following to .ssh/config:
host target
hostname sshrelay
port 2222
RequestTTY yes
user root
So now I can do this:
ssh target root@target
blindcoder@sshrelay's password: ***
root@target:~#
But when trying to do this with cssh:
cssh "target root@target"
cssh will instead run this command:
Running:ssh -l target root target
I patched ClusterSSH/Helper.pm lines 111 ff. like this to achieve what I need:
#if(\$user) {
#unless("$comms" eq "telnet") {
#\$user = \$user ? "-l \$user " : "";
#\$user = \$user ? " \$user\\\@\$svr " : "";
#\$command .= \$user;
#}
#}
if("$comms" eq "telnet") {
\$command .= "\$svr \$port";
} else {
if (\$port) {
\$command .= "-p \$port \$user\\\@\$svr";
} else {
\$command .= "\$user\\\@\$svr";
}
}
But I'd really really like not to have to patch cssh files to achieve this.
Do you have a suggestion on how to achieve this without patching cssh?
Kind regards,
Benjamin