How create multiples ssh on same host without asking same password
Eric LeBlanc
inouk at igt.net
Thu Jul 1 23:46:53 EST 2004
On Thu, 1 Jul 2004, Damien Miller wrote:
> Eric LeBlanc wrote:
> > Hello,
> >
> > I used the SecureShell windows client from ssh.com and it have a cool
> > feature: Once I logged on a server with ssh, I was able to create more
> > terminals without being asked for a password again. It seems that it use
> > the 'same channel' created from the first ssh client.
> >
> > So, it's possible with openssh on linux/bsd? If yes, how? If not, can you
> > add this feature?
>
> Already done - see ControlMaster in the ssh_config manpage of the
> current CVS version.
>
> This will be in the next release.
>
> -d
>
Hello,
Thank you, it works very well, but I think that the man page need
more details about it.
For example, it's not pratical (if I understand well) to set the
ControlPath and ControlMaster directly on ssh_config. The problem is when
I setup like this:
ControlMaster=yes
ControlPath=/wathever/you/want
Every time I start SSH, it's alway considered as master, so ssh will ask
the password. They 'better' way is:
ssh -M -S /path/to/control/file username at host.domain
and for next sessions using the same channel:
ssh -S /path/to/control/file username at host.domain
I've created a mini script that does the 'dirty' job:
---- cut -------------------------------------------
SOCKET=/tmp/BLAH
SSH=/usr/local/bin/ssh
if [ ! -S ${SOCKET} ]
then
${SSH} -M -S ${SOCKET} myserver.domain
else
${SSH} -S ${SOCKET} myserver.domain
fi
---- cut -------------------------------------------
Am I wrong?
Or, the flag to disable the Master in ssh command is there but missing in
the man page? I know that it is the default (No master), but when it
configured in ssh_config, it will be always considered as master.
Or else, it currently in devel and it's not finished and I must wait
before talking about it?
Finally, a little note: when I specify the flag -S, I know that I don't
need to specify the server, but SSH will return an error. So, if it not
corrected, well, I will send to you this little patch:
----------------------------------- CUT ----------------------------------
--- ssh_bak.c 2004-07-01 09:33:20.000000000 -0400
+++ ssh.c 2004-07-01 09:37:45.000000000 -0400
@@ -485,7 +485,7 @@
}
/* Check that we got a host name. */
- if (!host)
+ if ( (!host) && (strlen(options.control_path) != 0) &&
(options.control_master != -1) )
usage();
SSLeay_add_all_algorithms();
---------------------------------- CUT ------------------------------------
E.
--
Eric LeBlanc
inouk at igt.net
--------------------------------------------------
UNIX is user friendly.
It's just selective about who its friends are.
==================================================
More information about the openssh-unix-dev
mailing list