authorized_keys and command=
From: David Magda (dmagda+trace040423_at_ee.ryerson.ca)
Date: 06/18/04
- Previous message: No, not THAT Michael Moore: "Directing output to local ports"
- Next in thread: Per Hedeland: "Re: authorized_keys and command="
- Reply: Per Hedeland: "Re: authorized_keys and command="
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 18 Jun 2004 16:42:50 -0400
Hello,
Trying to use the command="" keyword in OpenSSH 3.4p1 (Debian woody)
and having a small issue.
----- /\/\/\/\/\ -----
| A |---< Internet >----| B |
----- \/\/\/\/\/ -----
I can't get to B directly, so I'm creating a tunnel from B to A so I
can log into B.
B:~$ ssh -R 10000:localhost:22 vpn@A
On A, I can now connect to port 10,000 and reach sshd(8) on B.
To increase security a bit I have a special user ("vpn") setup on A
that allows public-key logins, but has a disabled password. To keep
the connection going, I have the vmstat(8) command running (to
minimize issues with connections timing out).
My A:~vpn/.ssh/authorized_keys looks like this:
command="vmstat 3 > /dev/null" ssh-dss AAAAB3Nzaakdghkas ... Vw== user@B
When I kill the login on B (with a ^C), the vmstat is still running
on A. However, if I get rid of the redirection to /dev/null and ^C
the connection then the vmstat dies.
How is the /dev/null redirection changing the behaviour of the shell
on A?
(It's not a big deal for me to get rid of it, I just want to
understand what's occuring.)
Thanks for any info.
-- David Magda <dmagda at ee.ryerson.ca>, http://www.magda.ca/ Because the innovator has for enemies all those who have done well under the old conditions, and lukewarm defenders in those who may do well under the new. -- Niccolo Machiavelli, _The Prince_, Chapter VI
- Previous message: No, not THAT Michael Moore: "Directing output to local ports"
- Next in thread: Per Hedeland: "Re: authorized_keys and command="
- Reply: Per Hedeland: "Re: authorized_keys and command="
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|