[NTLUG:Discuss] Can't login to CVS pserver over SSH tunnel
Richard Cobbe
cobbe at airmail.net
Thu Feb 7 07:45:39 CST 2002
Lo, on Wednesday, February 6, Neil Aggarwal did write:
> Richard:
>
> I can't do an ssh to cvs at dev.jammconsulting.com since
> the instructions I am following have the cvs user's shell
> set to zzh. That shell does nothing. It exists immediately.
Ah. I think that's your problem. I just ran some tests here (Debian
2.2, openssh 1.2.3, yes, I know this is ancient): when the login session
terminates, the port is no longer forwarded. User cvs needs to have a
real shell---or at least, one that doesn't terminate immediately. If
you don't want to supply a real shell for security reasons, something
like the following should work nicely:
#include <unistd.h>
#include <limits.h>
int main()
{
sleep(INT_MAX); /* manpage says unsigned; it's really just an int */
return 0;
}
I just tested this here, and it works fine. Ctrl-C the ssh session to
terminate the port forwarding. (It'll also automatically terminate
after INT_MAX seconds, or just over 68 years. If you need more than
that, you can always stick the call to sleep in a loop. <grin>)
> At the very end, ssh prints out this line:
> /tmp/filezIR4z5
> That file exists on the server as a device. I think that means that
> the pipe was set-up correctly. Is that correct?
I've never seen this before, so I'm not entirely sure what this is. I'm
pretty certain it's not your problem, but just out of curiosity, what
are the major & minor device numbers, and is it block or character?
Richard
More information about the Discuss
mailing list