Mail Archives: cygwin/2005/07/13/01:46:30
> >It was the other way around. I happened to have an "old" open shell
> >where id was still seen as 400, and *there* did ssh work; but when
> >I closed the window and opened a new shell, my numeric user id is
> >now 121833 and ssh does not work anymore at all.
>
>
> Ah-huh. And did you do what I suggested?
Yes
> >> You'll
> >> probably find that you need to change the ownership of files
> >> in your home
> >> directory (at least) to enable public key authentication again.
> >
> >You mean: changing all files to owner 121833? That is:
> Should I do this:
> >
> > chown -R 121833 ~
>
> Yep.
Incidentally, this does not work for many files. I get the error message
chown: changing ownership of ....: Permission denied
This seems to be related to another a problem I am discussing here in
the thread
with subject line "chmod suddenly ceased to work on old files - NEW
FINDINGS".
chown seems to fail exactly for those files where I also have no
permission to
do a chmod.
>
> >But for the test of ssh, wouldn't it make more sense to
> chown the id_rsa
> >file instead? Note that on my system, it is not in ~/.ssh, but in
> >/cygdrive/h/.ssh. So I did a
> >
> > chown 121833 /cygdrive/h/.ssh/id_rsa
>
> And /cygdrive/h isn't your home directory as far as Cygwin is
> concerned?
It is, but for historical reasons, id_rsa is under /cygdrive/c/.ssh and
I always pass the correct id_rsa via the -i flag of ssh.
> Well, if you've done as I suggested and you're still having
> problems, it's
> time to run the server in debug mode and see what you get
> from that. This
> should tell you pretty clearly why it's not working for you.
> I find the
> most convenient way to debug the server is to create a new
> service that I
> can run instead of the current. That way I don't have to
> keep editing
> the registry or uninstalling and reinstalling. I use
> something like this:
>
> cygrunsrv -I sshd_debug -d "CYGWIN sshd debug" -p
> /usr/sbin/sshd -a -D -d -d -d
I don't have a sshd on my machine. I use Windows only as ssh client, in
order to
access some Unix hosts.
As I have no root rights on these hosts, it will be difficult to run ssh
in
debug mode there.
I have the feeling that all trouble I'm having, is connected to two
problems. One is some kind of weird permission problem and means that
I can't chmod some (quite a few actually) files, and that I can't
chown them (but note that I *can* chown id_rsa!). This symptom suddenly
became evident a few weeks ago.
The second problem is that ssh ceased to work. It ceased to work, as far
as
I can tell, after I had recreated /etc/passwd and /etc/group, and the
most
noticeable difference between the passwd before, and the passwd after,
is
that the user id had changed during recreation.
So what I did is to manually edit /etc/passwd and set my user id back to
400.
Then I opened a new cygwin shell and, voila, ssh works again.
Now the question is: What possible damage to my system could I have
introduced by manually changing the uid for my account in /etc/passwd?
After all, I'm always a bit reluctant to hack around in my passwd
file....
Ronald
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -