<h2>Intro</h2>
<p>Ssh is a very commonly used program for connecting to remote computers over a secure channel.</p>
<p>The ssh daemon, sshd, should be running on the remote computer, usually on port 22.</p>
<p>The local computer should have the ssh client installed, ssh.</p>
<p>The config files are usually foud in <em>/etc/ssh</em>.</p>
<p>Client config file is <em>/etc/ssh_config</em>.<br />Daemon config file is <em>/etc/sshd_config</em>.</p>
<p>&nbsp;</p>
<h2>The problem</h2>
<p>You're trying to ssh to a remote computer and keep getting asked for a password, even though you did copied your public key to the remote computer. You don't see any error message.</p>
<p>First try this to get more verbose information when connecting.</p>
<pre># ssh -vv&nbsp;<a href="mailto:This email address is being protected from spambots. You need JavaScript enabled to view it.">This email address is being protected from spambots. You need JavaScript enabled to view it.;/a>
...<a href="mailto:This email address is being protected from spambots. You need JavaScript enabled to view it."><br /></a>Unspecified GSS failure. Minor code may provide more information<br /><span style="background-color: #f5f5f5; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; white-space: pre-wrap;">No Kerberos credentials available (default cache: KEYRING:persistent:0)<br />...</span></pre>
<p>&nbsp;</p>
<p>The problem is likely to be a permission issue with the hidden .ssh folder in your home folder.</p>
<p>Typically you want these settings:</p>
<p>.ssh folder should have permissions 700 (drwx------)<br />Public key (.pub file) should have permissions 644&nbsp;(-rw-r--r--)<br />Private key (id_rsa) should have permissions 600&nbsp;(-rw-------)<br />Additionally your home folder should generally not have write access by other groups or the world, 755 is prudent to use.&nbsp;(drwxr-xr-x)</p>
<p>Use these command to set the permissions.</p>
<pre># cd /home/sorin<br /># chmod 700 .ssh<br /># chmod 644 ./ssh/id_rsa.pub<br /># chmod 600 ./ssh/id_rsa<br /><br />For good measure, set this as well.<br /># chmod 755 /home/sorin</pre>
<p>&nbsp;</p>
<p>Having set the permissions on the .ssh folder, you should be able to properly connect to the remote computer with no questions asked.</p>
<p>&nbsp;</p>
<h2>Sources</h2>
<p><a href="https://superuser.com/questions/215504/permissions-on-private-key-in-ssh-folder">https://superuser.com/questions/215504/permissions-on-private-key-in-ssh-folder</a></p>
<p><a href="https://www.linode.com/community/questions/11373/solved-ssh-permission-denied-publickeygssapi-keyexgssapi-with-micpassword">https://www.linode.com/community/questions/11373/solved-ssh-permission-denied-publickeygssapi-keyexgssapi-with-micpassword</a></p>
<p>&nbsp;</p>