this was tested on Linux debian7 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 GNU/Linux

ssh-keys instead of passwords is a saver way of communication/connecting/pushing sources, because it’s not prone to brute-force password-guessing. (believe me i have seen servers with password-auth beeing hacked… )


adduser "SameUsernameAsOnGithub";
su SameUsernameAsOnGithub;
cd ~/.ssh;
ls -al;
ssh-keygen -t rsa -C "admin@dwaves.de";
chmod 0600 ~/.ssh/id_rsa;
chmod 0700 ~/.ssh/;

# steer your browser to
browser https://github.com/settings/ssh
# and paste what comes out of: (BUT DO NOT COPY THE LINEBREAK!)

cat id_rsa.pub;

# during the step of:
ssh-add ~/.ssh/id_rsa

# if you get a message like:
Could not open a connection to your authentication agent.

# do this and try again:
eval `ssh-agent`
ssh-add ~/.ssh/id_rsa

# test connection
ssh -T git@github.com;

The authenticity of host 'github.com (192.30.252.131)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'github.com,192.30.252.131' (RSA) to the list of known hosts.
Hi SameUsernameAsOnGithub! You've successfully authenticated, but GitHub does not provide shell access.

 

(if you are on mac or windows : Forget the terminal. Download our native app instead. MAC WINDOWS)

We strongly recommend using an SSH connection when interacting with GitHub. SSH keys are a way to identify trusted computers, without involving passwords. The steps below will walk you through generating an SSH key and then adding the public key to your GitHub account.

if you get:
"Permission denied (publickey)."

This is a known problem with certain Linux distributions. For a possible resolution, see our help article.

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin