scp over existing ssh tunnels?
Chip Marshall
chip at 2bithacker.net
Mon Jul 30 11:06:54 EDT 2007
On 7/30/07, Paul Lussier <p.lussier at comcast.net> wrote:
> I could just scp it directly, but that opens up another connection.
> The goal is to re-use the existing connection. In my config file, I
> have:
>
> host *
> ControlMaster yes
> ControlPath /tmp/%r@%h:%p
>
> This allows me to then do:
>
> ssh -S /tmp/pll at taz:22 taz.mydomain.org
I just gave it a try here. My ~/.ssh/config:
HashKnownHosts no
VerifyHostKeyDNS yes
ControlMaster auto
ControlPath /tmp/%r@%h:%p
Then just
ssh remotehost
and
scp remotehost:~/file ./
It looks like with 'ControlMaster yes' in the config, the scp connection
was trying to set up another control socket, which was failing because
one already existed. Setting 'ControlMaster auto' tells it to use a
control socket if it's there, or make one if it isn't.
Also, this is a neat feature that I had never known about before. Thanks :)
--
Chip Marshall <chip at 2bithacker.net> http://kyzoku.2bithacker.net/
GCM/IT d+(-) s+:++ a26>? C++ UB++++$ P+++$ L- E--- W++ N@ o K- w O M+
V-- PS+ PE Y+ PGP++ t+@ R@ tv@ b++@ DI++++ D+(-) G++ e>++ h>++ r-- y?
More information about the gnhlug-discuss
mailing list