How create multiples ssh on same host without asking same password

Markus Friedl markus at openbsd.org
Fri Jul 2 03:12:11 EST 2004


On Thu, Jul 01, 2004 at 09:46:53AM -0400, Eric LeBlanc wrote:
> 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

no, it's better to do it this way

	Host foo
		ControlMaster yes
		ControlPath /wathever/you/want
	Host bar
		ControlPath /wathever/you/want

so after 
	ssh foo
you can use
	ssh bar
to connect to foo via the first connection.




More information about the openssh-unix-dev mailing list