Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am working on a tooltwist staging server using an Amazon Linux Server but I have to always provide my login username and password. How do I access the linux server securely without going through this?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

If you are accessing it from a OSx machine do the following. The general principle being that you generate an public key and then take your public key and put it on the remote server.

On your machine

ssh-keygen -t rsa

This should generate a id_rsa.pub file in your ~/.ssh directory. Take the contents of this file and paste it on the ~/.ssh/authorized_keys file.

Some notes to ensure. Both sides should have .ssh and the files under .ssh be with 600 permissions. Or else you will get errors.

share|improve this answer
1  
Use ssh-copy-id <host> to copy your ssh key to a new server. –  Tass Oct 15 '12 at 8:50
    
ssh-copy-id unfortunately is Linux only. If you are on OSx or Windows, need to do it manually. Though it does not come out of the box for OSx, there are some scripts available to install to mimic this. –  unixrules Oct 15 '12 at 9:01
    
... so copy it over from a Linux machine. –  Tass Oct 15 '12 at 16:13

ssh with key-pairs, and a locally running ssh-agent.

man ssh-keygen
man ssh-copy-id
man ssh-add
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.