[NTLUG:Discuss] Can't login to CVS pserver over SSH tunnel
Neil Aggarwal
neil at JAMMConsulting.com
Thu Feb 7 09:22:27 CST 2002
Richard:
I copied your code to zzh.c and compiled it to zzh.
If I use ssh to do this:
ssh cvs at dev.jammconsulting.com
Here is what I get:
Could not create directory '/home/Administrator/.ssh'.
The authenticity of host 'dev.jammconsulting.com (204.130.252.205)' can't be
established.
RSA key fingerprint is 77:12:5a:f6:36:c3:40:e7:e8:cc:69:f4:31:7b:f9:13.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts
(/home/Administrator/.ssh/known_hosts).
Last login: Thu Feb 7 09:08:22 2002 from pppa52-nas1rack6017.dialinx.net
So, it looks like the login is OK.
Next I created the tunnel:
ssh cvs at dev.jammconsulting.com -L 2401:dev.jammconsulting.com:2410 open
Could not create directory '/home/Administrator/.ssh'.
The authenticity of host 'dev.jammconsulting.com (204.130.252.205)' can't be
established.
RSA key fingerprint is 77:12:5a:f6:36:c3:40:e7:e8:cc:69:f4:31:7b:f9:13.
Are you sure you want to continue connecting (yes/no)? [I typed yes]
Failed to add the host to the list of known hosts
(/home/Administrator/.ssh/known_hosts).
And it sits there. I assume this means that everything is OK, especially
because
I now have a zzh process on the server owned by the cvs account.
Then, I tried the cvs login command:
cvs -d :pserver:neil at localhost:/testproject login
(Logging in to neil at localhost)
CVS password: [I typed the password]
cvs [login aborted]: recv() from server localhost: Connection reset by peer
I am still getting a connection reset by peer problem.
Any other ideas?
Thanks,
Neil.
--
Neil Aggarwal
JAMM Consulting, Inc. (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development Websites, Ecommerce, Java, databases
> -----Original Message-----
> From: discuss-admin at ntlug.org [mailto:discuss-admin at ntlug.org]On Behalf
> Of Richard Cobbe
> Sent: Thursday, February 07, 2002 7:46 AM
> To: discuss at ntlug.org
> Subject: RE: [NTLUG:Discuss] Can't login to CVS pserver over SSH tunnel
>
>
> 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
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
More information about the Discuss
mailing list