Author Topic: Cygwin directory moving woes  (Read 1091 times)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Cygwin directory moving woes
« on: February 03, 2012, 12:05:00 AM »
Just posting this in case other people have the same issues I did.  I got a new hard drive and moved a bunch of things over to it (including Cygwin), then replaced my old one - same drive letter and everything.  Unfortunately, this screwed up a bunch of permissions.  First it was complaining about write access to /var/empty, so I had to chmod and/or chown those (should have noted all this stuff down if I knew it was going to take 2 days to get it all back up and running again).  I really didn't want to have to reconfigure everything, set up new keys, etc., but in retrospect, it would have probably been easier to just reinstall.

Edited /etc/sshd_config and added this line:
LogLevel DEBUG

Messages get logged to windows event viewer (control panel/administrative tools/event viewer/windows logs/application).

sshd: PID 1036: debug1: userauth-request for user jitspoe service ssh-connection method none
sshd: PID 1036: debug1: attempt 0 failures 0
sshd: PID 3740: User jitspoe not allowed because shell /bin/bash is not executable
sshd: PID 1036: input_userauth_request: invalid user jitspoe
sshd: PID 3740: Failed none for invalid user jitspoe from 70.85.9.178 port 49661 ssh2
sshd: PID 1036: debug1: userauth-request for user jitspoe service ssh-connection method publickey
sshd: PID 1036: debug1: attempt 1 failures 0
sshd: PID 1036: debug1: userauth-request for user jitspoe service ssh-connection method keyboard-interactive

chmod 700 /bin/bash
or chmod 777 /bin/bash


sshd: PID 2536: debug1: userauth-request for user jitspoe service ssh-connection method none
sshd: PID 2536: debug1: attempt 0 failures 0
sshd: PID 4808: Failed none for jitspoe from 70.85.9.178 port 51674 ssh2
sshd: PID 2536: debug1: userauth-request for user jitspoe service ssh-connection method publickey
sshd: PID 2536: debug1: attempt 1 failures 0
sshd: PID 2536: debug1: test whether pkalg/pkblob are acceptable
sshd: PID 4808: debug1: temporarily_use_uid: 1000/513 (e=1004/513)
sshd: PID 4808: debug1: trying public key file /var/empty/.ssh/authorized_keys
sshd: PID 4808: debug1: restore_uid: 1004/513
sshd: PID 4808: debug1: temporarily_use_uid: 1000/513 (e=1004/513)
sshd: PID 4808: debug1: trying public key file /var/empty/.ssh/authorized_keys
sshd: PID 4808: debug1: restore_uid: 1004/513
sshd: PID 4808: Failed publickey for jitspoe from 70.85.9.178 port 51674 ssh2
sshd: PID 2536: debug1: userauth-request for user jitspoe service ssh-connection method keyboard-interactive

Lets me log in with a password at least.

Edited /etc/sshd_config

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile   .ssh/authorized_keys

To start the service manually:
cygrunsrv -S sshd

No go...

sshd: PID 4656: debug1: trying public key file //.ssh/authorized_keys

Commented the lines back out like they were originally:

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile   .ssh/authorized_keys

SUCCESS!  For now.


This post isn't really meant to make sense.  It's just for future reference and/or people searching google for answers.