Discussion:
SSH error: end of file from server
Andrew Wood
2005-05-08 10:59:03 UTC
Permalink
Any idea why I cant access a repository to checkout a project remotely,
but I can on the local machine.
I'm trying to do it with CVS on Mac OS X which is installed by default,
along with OpenSSH. I'm also trying it with TortoiseCVS on Windows, which
I beleive includes i'ts own SSH client (a copy of PuTTY?).

The server is running the latest version of CVS on Linux. I can SSH into
the server and get a shell, and do anything, including checking out the
project into my home dir on the server, but trying to do it from another
machine (OS X) gives the following error:

Operation timed out
cvs [checkout aborted]: end of file from server (consult above messages if
any)

The command I'm using is:

cvs -d :ext:***@server.org:/cvsroot checkout test2

On Windows, I get a different error:

Cannot open CVS/Entries for reading. No such file or directory

I've looked through the archives and a couple of people seem to have had a
similar problem but I couldnt find a real solid solution, other than a
hint that SSH isn't connecting, which would fit seeing as it isn't
prompting for a password (on OS X), yet on Windows it does :S
Thanks
Russ Sherk
2005-05-08 11:35:45 UTC
Permalink
Post by Andrew Wood
Any idea why I cant access a repository to checkout a project remotely,
but I can on the local machine.
I'm trying to do it with CVS on Mac OS X which is installed by default,
along with OpenSSH. I'm also trying it with TortoiseCVS on Windows, which
I beleive includes i'ts own SSH client (a copy of PuTTY?).
The server is running the latest version of CVS on Linux. I can SSH into
the server and get a shell, and do anything, including checking out the
project into my home dir on the server, but trying to do it from another
Operation timed out
cvs [checkout aborted]: end of file from server (consult above messages if
any)
Is your CVS_RSH env var set? By default, cvs tries to use 'rsh' as
the remote shell (the rsh port is usually blocked; thus the timeout).
Set it to the path of your ssh client on the client machine.

e.g. set CVS_RSH=d:\tools\Putty\bin\putty.exe

Cheers,

--Russ
Post by Andrew Wood
Cannot open CVS/Entries for reading. No such file or directory
I've looked through the archives and a couple of people seem to have had a
similar problem but I couldnt find a real solid solution, other than a
hint that SSH isn't connecting, which would fit seeing as it isn't
prompting for a password (on OS X), yet on Windows it does :S
Thanks
_______________________________________________
Info-cvs mailing list
http://lists.gnu.org/mailman/listinfo/info-cvs
Andrew Wood
2005-05-08 18:28:33 UTC
Permalink
Post by Russ Sherk
Is your CVS_RSH env var set?
I'm pretty sure it is on Windows, but what about OS X. Is this a standard
Unix shell variable or what?

echo $CVS_RSH just gives an empty line.
Andrew Wood
2005-05-09 17:51:30 UTC
Permalink
I'm ignoring the problem on Windows for the time being because theres a
separate mailing list for Tortoise CVS, but on OS X, where I'm running the
normal Unix version of CVS, my OpenSSH client is at
/usr/bin/ssh

I've set the CVS_RSH environment variable to /usr/bin/ssh, /usr/bin and
ssh, and none of them work. Now when I try to checkout I instantly get
the following error:
cvs [checkout aborted]: cannot exec: No such file or directory
cvs [checkout aborted]: end of file from server (consult above messages if
any)

It's now trying to use SSH, which it wasnt before but cant find it??

Thanks
Andrew
Mark D. Baushke
2005-05-09 18:09:03 UTC
Permalink
Post by Andrew Wood
I'm ignoring the problem on Windows for the time being because theres a
separate mailing list for Tortoise CVS, but on OS X, where I'm running the
normal Unix version of CVS, my OpenSSH client is at
/usr/bin/ssh
I've set the CVS_RSH environment variable to /usr/bin/ssh, /usr/bin and
ssh, and none of them work. Now when I try to checkout I instantly get
cvs [checkout aborted]: cannot exec: No such file or directory
cvs [checkout aborted]: end of file from server (consult above messages if
any)
It's now trying to use SSH, which it wasnt before but cant find it??
Thanks
Andrew
First, for tcsh or csh shells use:

setenv CVS_RSH /usr/bin/ssh

for bash or other bourne shell variations use:

CVS_RSH=/usr/bin/ssh; export CVS_RSH

The command:

cvs -t version

should show you the command thas is being run remotely if you
look for the 'Starting server: /usr/bin/ssh host.dom.ain cvs server' text.

You should try a command like:

/usr/bin/ssh host.dom.ain date

to see if it will return the date to you.

The most likely problem with 'cannot exec' is that the server is
not finding the 'cvs' executable in your path. If you login to
the server and determine that 'cvs' lives in '/usr/local/bin/cvs'
then you could try on your client to use the CVS_SERVER variable

For tcsh or csh shells use:

setenv CVS_SERVER /usr/local/bin/cvs

for bash or other bourne shell variations sue:

CVS_SERVER=/usr/local/bin/cvs; export CVS_SERVER

Now when you run the 'cvs -t version' command you should see
some output that includes
'Starting server: /usr/bin/ssh host.dom.ain /usr/local/bin/cvs server'
in the output. If all goes well, you will also see lines like

'Client: Concurrent Versions System (CVS) 1.11.20 (client/server)'
'Server: Concurrent Versions System (CVS) 1.11.20 (client/server)'

or whatever version is actually running on the client and the server.

Good luck,
-- Mark
Andrew Wood
2005-05-10 17:34:42 UTC
Permalink
CVS_RSH=/usr/bin/ssh; export CVS_RSH

Thanks for that hint. I was doing it a slightly different way, which I
thought was working as echo $CVS_RSH worked, but clealry CVS didnt like
it!

Andrew
Mark D. Baushke
2005-05-10 18:04:08 UTC
Permalink
Post by Mark D. Baushke
CVS_RSH=/usr/bin/ssh; export CVS_RSH
Thanks for that hint. I was doing it a slightly different way, which I
thought was working as echo $CVS_RSH worked, but clealry CVS didnt like
it!
Some bourne shells allow you to combine the two statements into one:

export CVS_RSH=/usr/bin/ssh

in addition, you don't really need to use a full pathname for ssh, so

export CVS_RSH=ssh

is usually good enough.

If you wish to determine if a shell variable has been exported into the
environment, you may wish to use the 'printenv' command:

printenv CVS_RSH

Or, you could have your 'echo' command inside of a shell script that you
run.

Enjoy!
-- Mark

Continue reading on narkive:
Loading...