Discussion:
Multi Hopping by sshserver proxy with different keys
(too old to reply)
Nicolas Ferragu
2010-09-23 15:08:53 UTC
Permalink
Hi all,

This is my problem :
I want to do Multi Hopping through a proxy/jumper ssh-server with
ssh-agents but with different keys from caller to proxy and from proxy
to target.

The problem could be also set romanced like this : is there a way to get
different identity while I travel from Est to West ? - nothing to do
with any politic thoughts ;^)

In another words in another world :
The client :
is a putty/window station with pagent running well with the bastion
(ssh server proxy/jump ).
Let's says that Client uses USER key.
The bastion :
is a linux box with a ssh-agent running well with the target.
It accept in .ssh/authorized_keys the USER key.
Let's says that Bastion uses ROLE key.
The target :
is unix box (linux for the test) accept in .ssh/authorized_keys only
Bastion/ROLE.
The question :
is there a way to automate the connexion from client to target with
key-exchange-agents respectively ?
That is saying that I don't want any password prompt or passphrase. Any.


FYI, I succeeded in making a connection trick but there's a big lack of
screen functions (raw connection mode).
Putty conf :
connection type : raw
local proxy command : plink.exe -t %user@%proxyhost -agent "ssh
-p %port -l role %host"\n

The main problem reside in a full openssh environment of course.

Thanks in advance for sharing your interest,
Nicolas.

Post-scriptum La Poste

Ce message est confidentiel. Sous reserve de tout accord conclu par
ecrit entre vous et La Poste, son contenu ne represente en aucun cas un
engagement de la part de La Poste. Toute publication, utilisation ou
diffusion, meme partielle, doit etre autorisee prealablement. Si vous
n'etes pas destinataire de ce message, merci d'en avertir immediatement
l'expediteur.
Joachim Thuau
2010-09-23 16:26:19 UTC
Permalink
Your could do this with the following:
* ssh to bastion using your keys, and include a port forward from localhost to target
* ssh to forwarded port on localhost using target key.

Note that if this is for automation of tasks, you may need to keep the first connection going while starting the second. Once the second connection is going, the first one will not close fully until the tunnel is no longer in use.

Thanks,
Jok
Stephen Dowdy
2010-09-23 17:26:36 UTC
Permalink
Nicolas,

If i understand your request, fully...

I'll give you some info for OpenSSH (which you could use via Cygwin
on your windows client), but i don't know if PuTTY has similar
capability. (clearly, you've discovered plink.exe can do similar
things) (while this info may not apply directly to your problem, i
figure it'll be of general interest)

----------------
Host bastion
IdentityFile ~/.ssh/bastionkey
User bastionuser

Host target
IdentityFile ~/.ssh/targetkey
User targetuser
ProxyCommand ssh bastion nc target 22
----------------

If you have both keys on the client, a

ssh target

will "do the right thing(tm)" here by finding the target directive,
indirectly resolving to a bastion connection using the bastion key,
then piggy-backing on the established bastion connection's netcat
link to the target and applying the target key.

OpenSSH 5.5 or so has a builtin 'netcat' like facility using
'-W target:port', i haven't started using that yet, as my normal
systems (Debian Lenny) don't have that version.


Here's some hackery i have in my ~/.ssh/config file:

-----------------------
# Multi-(user+host) arbitrary gateway hopping
# usera%hosta!userb%hostb[!userc%hostc...]
# STILL requires using '-l userd' for destination user on command line (i.e. we ignore last
# user in specification
# e.g. ssh -l root ***@zia!***@umds0-vgw
Host *!*
GatewayPorts no
ProxyCommand $(h="%h";p="%p";ruh=${h##*\!};rh=${ruh##*\%%};ru=${ruh%%\%%*};ru=${ru:-${USER}};luh=${h%%\!*};lh=${luh##*\%%};lu=${luh%%\%%*};lu=${lu:-${USER}};echo ssh -l ${lu} ${lh} "\`type -p netcat nc | head -1\` ${rh} 22")
# h=host, p=port (expanded by openssh cmdline
# ruh,rh,ru=remote user+host, remote host, remote user (successively pulled off right-hand-side)
# luh,lh,lu=local user+host, local host, local user (pulled off left-hand-side)
#
-----------------------
This directive allows you, if you use a Bourne-Shell/posix-shell to
hop via an arbitrary number of [user@]host[!...] connections via
iterative deconstruction of the target specified within openssh.
If you have any required keys in your client ssh-agent, they'll be
appropriately applied down the chain. (be careful of shell
meta-character expansion of '!' -- I chose that after initially
having chosen '::' as the gateway delimiterd (DECnet style
poor-mans routing), and finding that while it worked for 'ssh',
it DOESN'T work for scp. '!' works for both ssh and scp.
You can use some other separator like "_", which isn't valid
DNS.

the \`type -p netcat nc | head -1\` is simply used to work on SLES
and *ever other* linux distro, since SLES uses 'netcat' (nc on SLES
is something else). That whole thing can be replaced with simply
'nc' if you don't need to deal with SLES. (and that's the primary
requirement for a Bourne-alike shell.


If i'm using the "bastion" (gateway) host frequently for multiple
connections (i have a number of systems that have a backend RFC1918
network of compute nodes or data servers), i may use ControlMasters
like:

Host gw1-* gw2-*
User blah
NumberOfPasswordPrompts 1
ConnectTimeout 60
ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p.sock

That way, i only authenticate once on the gateway host and use that
ControlMaster connection as the piggyback for subsequent connections
to that gateway and any hosts residing behind it. This is mainly
useful on systems where i'm required to enter a password, instead
of using authorized-key trust.

--stephen
--
Stephen Dowdy - Systems Administrator - NCAR/RAL
303.497.2869 - ***@ucar.edu - http://www.ral.ucar.edu/~sdowdy/
Nicolas Ferragu
2010-09-24 07:42:55 UTC
Permalink
Joachim,

Thanks for sharing.
That works but don't rocks; not the way I want :

1 - I need a fully autonomous procedure to connect to any target.
In your solution, I have to start each time a special connection which
I can't automate correctly within Putty localproxy command (teletype
screen issues) or within a pre-connection local command.

2 - The most important : the client Haven't Any Key to Target. It's the
bastion/gateway/jumper who Have keys.
In your solution, I don't know How to tell target to verify bastion's
key...

And of course I don't want an ssh in ssh like : ssh bastion ssh target
... even if that's doing what I want elsewhere the Microsoft land.

Here is a schematic view of my needs :

Windows Linux Linux
| | |
Putty OpenSSH_5.6p1 Openssh any version
| | |
Client ----------> Bastion ----------> Target
\_________________/ \________________/
Client's Key bastion's key
(Pagent) (ssh-agent)

Fyi : I've setted the environment file to get my ssh-agent acting in the
2nd connection (from B to T).

Thanks
Nicolas

-------- Message original --------
Sujet: Re: Multi Hopping by sshserver proxy with different keys
De : Joachim Thuau <***@heavy-iron.com>
Pour : ***@securityfocus.com <***@securityfocus.com>
Date : 23/09/2010 18:26
Post by Joachim Thuau
* ssh to bastion using your keys, and include a port forward from localhost to target
* ssh to forwarded port on localhost using target key.
Note that if this is for automation of tasks, you may need to keep the first connection going while starting the second.
Once the second connection is going, the first one will not close fully
until the tunnel is no longer in use.
Post by Joachim Thuau
Thanks,
Jok
Post-scriptum La Poste

Ce message est confidentiel. Sous reserve de tout accord conclu par
ecrit entre vous et La Poste, son contenu ne represente en aucun cas un
engagement de la part de La Poste. Toute publication, utilisation ou
diffusion, meme partielle, doit etre autorisee prealablement. Si vous
n'etes pas destinataire de ce message, merci d'en avertir immediatement
l'expediteur.
Nicolas Ferragu
2010-09-24 10:00:52 UTC
Permalink
Stephen,

The problem is that my target key is on the gateway bastion host !
The client don't have it. Moreover, the bastion's keys are protected by
passphrases and served by ssh-agent. So can't do any agentforwarding at
all..

Otherwise, I've never succeeded in having key exchange between bastion
and target while netcating in a proxycommand. It's ending systematically
with an interactive password prompt (not passphrase).

Of course the "ssh -t bastion ssh -t target" works well but I don't want
to do it like that because I use a putty client which won't behave
ergonomically if used that way.
The same idea applies to your - however excellent - hackery you made
with exclamation ! (I'm on Putty... Sorry for that).

Once again this is a schematic view of what I want :

Windows Linux Linux
| | |
Putty OpenSSH_5.6p1 Openssh any version
| | |
Client ----------> Bastion ----------> Target
\_________________/ \________________/
Client's Key bastion's key
(Pagent) (ssh-agent)

Summarizing my needs taking a similarity view like agentforwarding :
I'd like to have an ssh-agent hopping.



-------- Message original --------
Sujet: Re: Multi Hopping by sshserver proxy with different keys
De : Stephen Dowdy <***@ucar.edu>
Pour : Nicolas Ferragu <***@laposte.fr>
Copie à : ***@securityfocus.com
Date : 23/09/2010 19:26
Post by Stephen Dowdy
Nicolas,
If i understand your request, fully...
I'll give you some info for OpenSSH (which you could use via Cygwin
on your windows client), but i don't know if PuTTY has similar
capability. (clearly, you've discovered plink.exe can do similar
things) (while this info may not apply directly to your problem, i
figure it'll be of general interest)
----------------
Host bastion
IdentityFile ~/.ssh/bastionkey
User bastionuser
Host target
IdentityFile ~/.ssh/targetkey
User targetuser
ProxyCommand ssh bastion nc target 22
----------------
If you have both keys on the client, a
ssh target
will "do the right thing(tm)" here by finding the target directive,
indirectly resolving to a bastion connection using the bastion key,
then piggy-backing on the established bastion connection's netcat
link to the target and applying the target key.
OpenSSH 5.5 or so has a builtin 'netcat' like facility using
'-W target:port', i haven't started using that yet, as my normal
systems (Debian Lenny) don't have that version.
-----------------------
# Multi-(user+host) arbitrary gateway hopping
# usera%hosta!userb%hostb[!userc%hostc...]
# STILL requires using '-l userd' for destination user on command line (i.e. we ignore last
# user in specification
Host *!*
GatewayPorts no
ProxyCommand $(h="%h";p="%p";ruh=${h##*\!};rh=${ruh##*\%%};ru=${ruh%%\%%*};ru=${ru:-${USER}};luh=${h%%\!*};lh=${luh##*\%%};lu=${luh%%\%%*};lu=${lu:-${USER}};echo ssh -l ${lu} ${lh} "\`type -p netcat nc | head -1\` ${rh} 22")
# h=host, p=port (expanded by openssh cmdline
# ruh,rh,ru=remote user+host, remote host, remote user (successively pulled off right-hand-side)
# luh,lh,lu=local user+host, local host, local user (pulled off left-hand-side)
#
-----------------------
This directive allows you, if you use a Bourne-Shell/posix-shell to
iterative deconstruction of the target specified within openssh.
If you have any required keys in your client ssh-agent, they'll be
appropriately applied down the chain. (be careful of shell
meta-character expansion of '!' -- I chose that after initially
having chosen '::' as the gateway delimiterd (DECnet style
poor-mans routing), and finding that while it worked for 'ssh',
it DOESN'T work for scp. '!' works for both ssh and scp.
You can use some other separator like "_", which isn't valid
DNS.
the \`type -p netcat nc | head -1\` is simply used to work on SLES
and *ever other* linux distro, since SLES uses 'netcat' (nc on SLES
is something else). That whole thing can be replaced with simply
'nc' if you don't need to deal with SLES. (and that's the primary
requirement for a Bourne-alike shell.
If i'm using the "bastion" (gateway) host frequently for multiple
connections (i have a number of systems that have a backend RFC1918
network of compute nodes or data servers), i may use ControlMasters
Host gw1-* gw2-*
User blah
NumberOfPasswordPrompts 1
ConnectTimeout 60
ControlMaster auto
That way, i only authenticate once on the gateway host and use that
ControlMaster connection as the piggyback for subsequent connections
to that gateway and any hosts residing behind it. This is mainly
useful on systems where i'm required to enter a password, instead
of using authorized-key trust.
--stephen
Post-scriptum La Poste

Ce message est confidentiel. Sous reserve de tout accord conclu par
ecrit entre vous et La Poste, son contenu ne represente en aucun cas un
engagement de la part de La Poste. Toute publication, utilisation ou
diffusion, meme partielle, doit etre autorisee prealablement. Si vous
n'etes pas destinataire de ce message, merci d'en avertir immediatement
l'expediteur.
Igor Bukanov
2010-09-25 10:34:21 UTC
Permalink
      connection type : raw
-p %port -l role %host"\n
I assume "ssh -p %port -l role %host" here is a command executed on
the bastion to connect to the target. Currently it does not work as
the target asks for the key known only for the bastion.

You mentioned that "ssh-agent running well with the target.". If that
means that bastion has ssh-agent running with a key for the target
then in the above command you just need to tell the ssh where to look
for ssh agent socket. You can do that with env command that sets
SSH_AUTH_SOCK like in:

plink.exe -t %user@%proxyhost -agent "env
SSH_AUTH_SOCK=<path-to-socket> ssh -p %port -l role %host"

The default socket location is /tmp/ssh-XXXXXXXXXX/agent.<ppid>. For
maximum convenience you may run the ssh-agent on bastion with -d
option to specify the exact location of the socket like in:

ssh-agent -b "$HOME/.ssh/agent-socket"

and then set SSH_AUTH_SOCK in the above command to /home/user/.ssh/agent-socket


On the other hand the setup like that implies that one can always
connect to the target if he has the key to bastion. Moreover, anybody
who can login to bastion under your user name can also recover the
private key for the target via inspecting ssh-agent memory. So the
setup above is less secure if you would simply have the key to the
target on your local box properly password-protected and loaded into
putty agent.

Regards, Igor
Nicolas Ferragu
2010-09-27 07:51:43 UTC
Permalink
Richard,

Yes of course I could use remote command field but as I said before I
don't want to do a command like "ssh bastion ssh target" since I'd like
to use Putty as if I where connecting directly my target - ie I'd like
to use the bastion in a proxy way. In another words, I don't want
anything but telling Putty to connect to my target in the main field
Hostname.

Moreover, I don't want to deal with password's accounts since key
exchanges are mandatory in the project.

I think I gonna modify putty's code to make a direct remote command
proxy protocol.

Thanks for sharing,
NF

-------- Message original --------
Sujet: Re: Multi Hopping by sshserver proxy with different keys
De : Wilson, Richard <***@hp.com>
Pour : Nicolas Ferragu <***@laposte.fr>, Stephen Dowdy
<***@ucar.edu>
Copie à : "***@securityfocus.com" <***@securityfocus.com>
Date : 24/09/2010 21:55
Nicholas,
You might try using the PuTTY "Remote Command" field in the SSH panel to start a script on the Bastion
host that would check and see if an agent was running, and start one if
not.

I would recommend expect as the scripting language for this -- it
emulates an interactive session and

SSH is designed to not accept passphrases and passwords as parms.

You could pass the passphrase as a parm from the Windows host if your
security allows it and

avoid storing the passphrase on the bastion host.
HTH,
Richard Wilson
Rich dot Wilson at hp dot com
-----Original Message-----
Sent: Friday, September 24, 2010 3:01 AM
To: Stephen Dowdy
Subject: Re: Multi Hopping by sshserver proxy with different keys
Stephen,
The problem is that my target key is on the gateway bastion host !
The client don't have it. Moreover, the bastion's keys are protected by passphrases and served by ssh-agent. So can't do any agentforwarding at all..
Otherwise, I've never succeeded in having key exchange between bastion and target while netcating in a proxycommand. It's ending systematically with an interactive password prompt (not passphrase).
Of course the "ssh -t bastion ssh -t target" works well but I don't want to do it like that because I use a putty client which won't behave ergonomically if used that way.
The same idea applies to your - however excellent - hackery you made with exclamation ! (I'm on Putty... Sorry for that).
Windows Linux Linux
| | |
Putty OpenSSH_5.6p1 Openssh any version
| | |
Client ----------> Bastion ----------> Target
\_________________/ \________________/
Client's Key bastion's key
(Pagent) (ssh-agent)
I'd like to have an ssh-agent hopping.
-------- Message original --------
Post by Stephen Dowdy
Nicolas,
If i understand your request, fully...
I'll give you some info for OpenSSH (which you could use via Cygwin on
your windows client), but i don't know if PuTTY has similar
capability. (clearly, you've discovered plink.exe can do similar
things) (while this info may not apply directly to your problem, i
figure it'll be of general interest)
----------------
Host bastion
IdentityFile ~/.ssh/bastionkey
User bastionuser
Host target
IdentityFile ~/.ssh/targetkey
User targetuser
ProxyCommand ssh bastion nc target 22
----------------
If you have both keys on the client, a
ssh target
will "do the right thing(tm)" here by finding the target directive,
indirectly resolving to a bastion connection using the bastion key,
then piggy-backing on the established bastion connection's netcat link
to the target and applying the target key.
OpenSSH 5.5 or so has a builtin 'netcat' like facility using '-W
target:port', i haven't started using that yet, as my normal systems
(Debian Lenny) don't have that version.
-----------------------
# Multi-(user+host) arbitrary gateway hopping
# usera%hosta!userb%hostb[!userc%hostc...]
# STILL requires using '-l userd' for destination user on command line
(i.e. we ignore last # user in specification # e.g. ssh -l root
Host *!*
GatewayPorts no
ProxyCommand
-${USER}};luh=${h%%\!*};lh=${luh##*\%%};lu=${luh%%\%%*};lu=${lu:-${USE
R}};echo ssh -l ${lu} ${lh} "\`type -p netcat nc | head -1\` ${rh}
22") # h=host, p=port (expanded by openssh cmdline # ruh,rh,ru=remote
user+host, remote host, remote user (successively pulled off
right-hand-side) # luh,lh,lu=local user+host, local host, local user
(pulled off left-hand-side) #
-----------------------
This directive allows you, if you use a Bourne-Shell/posix-shell to
iterative deconstruction of the target specified within openssh.
If you have any required keys in your client ssh-agent, they'll be
appropriately applied down the chain. (be careful of shell
meta-character expansion of '!' -- I chose that after initially having
chosen '::' as the gateway delimiterd (DECnet style poor-mans
routing), and finding that while it worked for 'ssh', it DOESN'T work
for scp. '!' works for both ssh and scp.
You can use some other separator like "_", which isn't valid DNS.
the \`type -p netcat nc | head -1\` is simply used to work on SLES and
*ever other* linux distro, since SLES uses 'netcat' (nc on SLES is
something else). That whole thing can be replaced with simply 'nc' if
you don't need to deal with SLES. (and that's the primary requirement
for a Bourne-alike shell.
If i'm using the "bastion" (gateway) host frequently for multiple
connections (i have a number of systems that have a backend RFC1918
network of compute nodes or data servers), i may use ControlMasters
Host gw1-* gw2-*
User blah
NumberOfPasswordPrompts 1
ConnectTimeout 60
ControlMaster auto
That way, i only authenticate once on the gateway host and use that
ControlMaster connection as the piggyback for subsequent connections
to that gateway and any hosts residing behind it. This is mainly
useful on systems where i'm required to enter a password, instead of
using authorized-key trust.
--stephen
Post-scriptum La Poste
Ce message est confidentiel. Sous reserve de tout accord conclu par ecrit entre vous et La Poste, son contenu ne represente en aucun cas un engagement de la part de La Poste. Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee prealablement. Si vous n'etes pas destinataire de ce message, merci d'en avertir immediatement l'expediteur.
Post-scriptum La Poste

Ce message est confidentiel. Sous reserve de tout accord conclu par
ecrit entre vous et La Poste, son contenu ne represente en aucun cas un
engagement de la part de La Poste. Toute publication, utilisation ou
diffusion, meme partielle, doit etre autorisee prealablement. Si vous
n'etes pas destinataire de ce message, merci d'en avertir immediatement
l'expediteur.
Jakub
2010-09-27 15:54:33 UTC
Permalink
you could use socat to forward ssh connections from one host to another
after logging into first one with password or whatever...
Post by Nicolas Ferragu
Richard,
Yes of course I could use remote command field but as I said before I
don't want to do a command like "ssh bastion ssh target" since I'd like
to use Putty as if I where connecting directly my target - ie I'd like
to use the bastion in a proxy way. In another words, I don't want
anything but telling Putty to connect to my target in the main field
Hostname.
Moreover, I don't want to deal with password's accounts since key
exchanges are mandatory in the project.
I think I gonna modify putty's code to make a direct remote command
proxy protocol.
Thanks for sharing,
NF
-------- Message original --------
Sujet: Re: Multi Hopping by sshserver proxy with different keys
Date : 24/09/2010 21:55
Nicholas,
You might try using the PuTTY "Remote Command" field in the SSH panel to start a script on the Bastion
 host that would check and see if an agent was running, and start one if
not.
I would recommend expect as the scripting language for this -- it
emulates an interactive session and
 SSH is designed to not accept passphrases and passwords as parms.
You could pass the passphrase as a parm from the Windows host if your
security allows it and
 avoid storing the passphrase on the bastion host.
HTH,
Richard Wilson
Rich dot Wilson at hp dot com
-----Original Message-----
Sent: Friday, September 24, 2010 3:01 AM
To: Stephen Dowdy
Subject: Re: Multi Hopping by sshserver proxy with different keys
Stephen,
The problem is that my target key is on the gateway bastion host !
The client don't have it. Moreover, the bastion's keys are protected by passphrases and served by ssh-agent. So can't do any agentforwarding at all..
Otherwise, I've never succeeded in having key exchange between bastion and target while netcating in a proxycommand. It's ending systematically with an interactive password prompt (not passphrase).
Of course the "ssh -t bastion ssh -t target" works well but I don't want to do it like that because I use a putty client which won't behave ergonomically if used that way.
The same idea applies to your - however excellent - hackery you made with exclamation ! (I'm on Putty... Sorry for that).
Windows             Linux               Linux
  |                   |                   |
Putty            OpenSSH_5.6p1      Openssh any version
  |                   |                   |
Client ----------> Bastion ----------> Target
  \_________________/   \________________/
     Client's Key         bastion's key
       (Pagent)             (ssh-agent)
I'd like to have an ssh-agent hopping.
-------- Message original --------
Post by Stephen Dowdy
Nicolas,
If i understand your request, fully...
I'll give you some info for OpenSSH (which you could use via Cygwin on
your windows client), but i don't know if PuTTY has similar
capability. (clearly, you've discovered plink.exe can do similar
things) (while this info may not apply directly to your problem, i
figure it'll be of general interest)
----------------
Host bastion
    IdentityFile    ~/.ssh/bastionkey
    User bastionuser
Host target
    IdentityFile    ~/.ssh/targetkey
    User targetuser
    ProxyCommand ssh bastion nc target 22
----------------
If you have both keys on the client, a
    ssh target
will "do the right thing(tm)" here by finding the target directive,
indirectly resolving to a bastion connection using the bastion key,
then piggy-backing on the established bastion connection's netcat link
to the target and applying the target key.
OpenSSH 5.5 or so has a builtin 'netcat' like facility using '-W
target:port', i haven't started using that yet, as my normal systems
(Debian Lenny) don't have that version.
-----------------------
# Multi-(user+host) arbitrary gateway hopping
#       usera%hosta!userb%hostb[!userc%hostc...]
# STILL requires using '-l userd' for destination user on command line
(i.e. we ignore last # user in specification # e.g.  ssh -l root
Host    *!*
    GatewayPorts no
    ProxyCommand
-${USER}};luh=${h%%\!*};lh=${luh##*\%%};lu=${luh%%\%%*};lu=${lu:-${USE
R}};echo ssh -l ${lu} ${lh} "\`type -p netcat nc | head -1\` ${rh}
22") # h=host, p=port (expanded by openssh cmdline # ruh,rh,ru=remote
user+host, remote host, remote user (successively pulled off
right-hand-side) # luh,lh,lu=local user+host, local host, local user
(pulled off left-hand-side) #
-----------------------
This directive allows you, if you use a Bourne-Shell/posix-shell to
iterative deconstruction of the target specified within openssh.
If you have any required keys in your client ssh-agent, they'll be
appropriately applied down the chain. (be careful of shell
meta-character expansion of '!' -- I chose that after initially having
chosen '::' as the gateway delimiterd (DECnet style poor-mans
routing), and finding that while it worked for 'ssh', it DOESN'T work
for scp.  '!' works for both ssh and scp.
You can use some other separator like "_", which isn't valid DNS.
the \`type -p netcat nc | head -1\` is simply used to work on SLES and
*ever other* linux distro, since SLES uses 'netcat' (nc on SLES is
something else).  That whole thing can be replaced with simply 'nc' if
you don't need to deal with SLES. (and that's the primary requirement
for a Bourne-alike shell.
If i'm using the "bastion" (gateway) host frequently for multiple
connections (i have a number of systems that have a backend RFC1918
network of compute nodes or data servers), i may use ControlMasters
Host gw1-* gw2-*
    User            blah
    NumberOfPasswordPrompts 1
    ConnectTimeout  60
    ControlMaster   auto
That way, i only authenticate once on the gateway host and use that
ControlMaster connection as the piggyback for subsequent connections
to that gateway and any hosts residing behind it.  This is mainly
useful on systems where i'm required to enter a password, instead of
using authorized-key trust.
--stephen
Post-scriptum La Poste
Ce message est confidentiel. Sous reserve de tout accord conclu par ecrit entre vous et La Poste, son contenu ne represente en aucun cas un engagement de la part de La Poste. Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee prealablement. Si vous n'etes pas destinataire de ce message, merci d'en avertir immediatement l'expediteur.
Post-scriptum La Poste
Ce message est confidentiel. Sous reserve de tout accord conclu par
ecrit entre vous et La Poste, son contenu ne represente en aucun cas un
engagement de la part de La Poste. Toute publication, utilisation ou
diffusion, meme partielle, doit etre autorisee prealablement. Si vous
n'etes pas destinataire de ce message, merci d'en avertir immediatement
l'expediteur.
Igor Bukanov
2010-09-27 19:13:52 UTC
Permalink
Anyway, the trick doesn't work correctly since the terminal mode is raw
: I can succeed in logging the way I want but can't do any vi or any tab
command completion...
Does putty have something like -t argument to ssh that force terminal
allocation? If it is supported then

putty -t bastion ssh target

should properly allocate terminal.

Regards, Igor

Loading...