Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to setup GIT using SSH mode. The central GIT repository is on a NAS device running Windows 2008 server and the user GIT repository is on ubuntu 12.04.

When I try to SSH to the windows machine however I am not able to successfully get in.

SSH keys are not setup but I think the problem is even before that since I can't get in just by providing the correct password. The output from the SSH command is below.

dba@clpserv01:~$ ssh -v -l administrator clpnas
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to clpnas [***.***.***.***] port 22.
debug1: Connection established.
debug1: identity file /home/dba/.ssh/id_rsa type -1
debug1: identity file /home/dba/.ssh/id_rsa-cert type -1
debug1: identity file /home/dba/.ssh/id_dsa type -1
debug1: identity file /home/dba/.ssh/id_dsa-cert type -1
debug1: identity file /home/dba/.ssh/id_ecdsa type -1
debug1: identity file /home/dba/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze2
debug1: match: OpenSSH_5.5p1 Debian-6+squeeze2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA bd:37:d1:98:51:2a:d6:b5:f5:c7:98:d8:74:2c:4e:cd
debug1: Host 'clpnas' is known and matches the RSA host key.
debug1: Found key in /home/dba/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/dba/.ssh/id_rsa
debug1: Trying private key: /home/dba/.ssh/id_dsa
debug1: Trying private key: /home/dba/.ssh/id_ecdsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
share|improve this question

migrated from Sep 27 '12 at 15:28

This question came from our site for professional and enthusiast programmers.

The first thing to do is to check your permissions on your home folder.

Run the following commands from the *nix command line:

1) navigate to your home directory:

cd ~

2) check the permissions on the home directory:

ls -dl
(if that doesn't work, try sudo -dl)

The results should look similar to the following:

drw------- 10 shaheed shaheed 4096 Nov 20 09:44 .

The 2nd through 4th characters indicate the permissions for the user which in this case should be rw-, or read/write. NOTE: if it says rwx instead, then that is the problem. ssh does not like for the home directory to have write permissions due to security concerns.

My guess is that yours reads similar to the following:

drwx------ 10 shaheed shaheed 4096 Nov 20 09:44 .

The letter x in the fourth position indicates that the user has execute permissions to the directory. This is the no-no.

To remedy this situation use the following command to remove the execute permission:

chmod 600 .

Then run the following command to verify that the permissions have been set properly:

ls -dl

You should get the following message:

ls: cannot access .: Permission denied

indicating that you no longer have execute permissions, which is a good thing.

Next run:

sudo ls -dl 

and you will be able to verify that everything is love! The result should be similar to:

drw------- 10 shaheed shaheed 4096 Nov 20 09:44 .

Now you should be able to ssh without being prompted for your git user password.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .