Server Fault is a question and answer site for system and network administrators. 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 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
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 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
Use ssh-copy-id <host> to copy your ssh key to a new server. – Reactormonk 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. – Reactormonk 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


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.