M BUZZ CRAZE NEWS
// news

Import SSH keys for remote server

By Emma Martinez

I have an Ubuntu 15.10 X64 and I am working on a project for which I am trying out GIT. I have created a repo on one of our remote servers, which is a Debian server, and the repo is accessible via SSH from command line as well as from Intellij. If you need any info, please let me know

enter image description here

I am trying to access it via a GIT-UI tool called GitGraken. It is looking for ssh keys for our remote server. How can I get those keys and add it for my user on the system so I can keep an eye on the repository. Any help would be nice.

3 Answers

You can create a ssh keypair in the terminal with the command: ssh-keygen. Then you have to add the public key(.pub).

see man ssh-keygen for more options

3

Use ssh-copy-id

If your local machine has the ssh-copy-id script installed, you can use it to install your public key to any user that you have login credentials for.

Run the ssh-copy-id script by specifying the user and IP address of the server that you want to install the key on, like this:

ssh-copy-id demo@SERVER_IP_ADDRESS
1

Finally, this link from debian helped. I created a key first with following command on my local machine :

ssh-keygen -t rsa

Then I copied contents of the public key(/home/username/.ssh/id_rsa.pub) into authorized keys on the server. After that I was able to login without password and solve the problem.

10

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy