Re: how to re-use existing session?
From: perl coder (perlcdr_at_mail.rumania)
Date: 03/09/04
- Previous message: Jared: "Re: ssh 2 tunnel to named pipe not working - please help"
- In reply to: Darren Tucker: "Re: how to re-use existing session?"
- Next in thread: Darren Tucker: "Re: how to re-use existing session?"
- Reply: Darren Tucker: "Re: how to re-use existing session?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 09 Mar 2004 16:35:14 GMT
Darren Tucker said:
>>[bozo@win98 C:\] ssh -N -L 3333:localhost:22 bozo@linux.box
>>
>>Ok now I created a non-interactive session. It's sitting there,
>>waiting...
>
> No, all you did is forward another port to sshd and it gets no free pass.
Hmm, but I had to authenticate to forward the port. Therefore there is
a session running, although it's in the background (no shell prompt).
This can be seen by looking at the network and process info on the client
and server:
[client (192.168.1.3)]
'netstat':
tcp 0 0 192.168.1.3:33776 192.168.1.101:22 ESTABLISHED
'ps':
4556 vc/4 S 0:00 ssh -N -L 3333:localhost:22 bozo@192.168.1.101
[server (192.168.1.101)]
'netstat':
tcp 0 0 192.168.1.101:22 192.168.1.3:33776 ESTABLISHED
tcp 0 48 192.168.1.101:22 192.168.1.3:33777 ESTABLISHED
'ps':
4470 ? S 0:00 /usr/sbin/sshd
4477 ? S 0:00 /usr/sbin/sshd
The server shows two running instances because I had to open a second
session to log in and run 'netstat' and 'ps'. Incidentally, that's
exactly what I'm trying to avoid having to do. :-) Basically there
should only be one single port 22 connection between the client and
server at any given time.
I can also remove the -N switch to the initial SSH command, and I'll get
a full-blown login shell, but that doesn't appear to present any
advantages.
But forget about the port-forwarding. Let's make it even simpler with
just this:
[bozo@win98 C:\] ssh -N bozo@linux.box
Now there's a session running. I want to re-use that session, and not
authenticate again. Not even with public keys.
> Download PuTTY and check out the documentation for pagent.
It looks like pageant is an analogue of ssh-agent, so I don't think
that'll help much. My private SSH keys don't even have a passphrase on
them, so I don't have any need to cache the unencrypted version. And
besides, ssh-agent is used to authenticate. I don't want to
authenticate again and again (even it it's done automatically). I just
want to re-use the same session that's open now and remains open.
But I don't know if that's even possible with SSH...
-- No crazy stuff in my email. ;-)
- Previous message: Jared: "Re: ssh 2 tunnel to named pipe not working - please help"
- In reply to: Darren Tucker: "Re: how to re-use existing session?"
- Next in thread: Darren Tucker: "Re: how to re-use existing session?"
- Reply: Darren Tucker: "Re: how to re-use existing session?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|