---
title: Simple auto SSH login to remote servers without Password
description: Simple auto SSH login to remote servers without Password
---

[![Exxa Managed IT Services Brisbane](https://blog.exxa.tech/hubfs/Exxa_June2019%20/Images/logo_Png_small_1.png)](https://exxa.tech)

- [Home](https://exxa.tech/)
- [Services](https://exxa.tech/services/it-services-inforgraphic) 
    - [All Services](https://exxa.tech/services/services)
    - [Managed IT Services](https://exxa.tech/services/it-managed-services)
    - [Compute and Email to Cloud Migrations](https://exxa.tech/services/compute-and-email-to-cloud-migrations)
    - [Automated Backups](https://exxa.tech/services/automated-backups)
    - [IT Security Services](https://exxa.tech/services/it-security-services)
    - [VOIP Hosted Phone Service](https://exxa.tech/services/pbx-voip-hosted-phone-service)
    - [Microsoft 365 Business & Office 365 Discounts](https://exxa.tech/services/office365-discounts)
    - [Surface Pro 6 for Business Tax Time offer!](https://exxa.tech/services/surface-pro-6-for-business-tax-time)
- [Insights](https://exxa.tech/insights/managed-it-services-insights) 
    - [News](https://exxa.tech/news)
    - [Articles](https://exxa.tech/table/articles/)
    - [LinkedIn](https://www.linkedin.com/company/exxa-tech)
- [Partners](https://exxa.tech/partners/partners)
- [STORE](https://store.exxa.tech/find/computer-systems)
- [FREE AUDIT](https://info.exxa.tech/audit)
- [CONTACT](https://exxa.tech/about/contact-us)

![Managed IT Services Brisbane Articles](https://blog.exxa.tech/hubfs/Exxa_June2019%20/Images/server_racks_blue.png "Managed IT Services Brisbane Articles")

# Exxa Articles

# Simple auto SSH login to remote servers without Password

# SIMPLE AUTO SSH LOGIN TO REMOTE SERVERS WITHOUT PASSWORD

 

First you’ll need to generate your local public key. This is the public end of a local public / private pair that you’ll share with the remote machine to identify you.

This guide was written for CentOS / RHEL with caveats for Ubuntu.

ssh-keygen -t rsa (on your local machine)

NB> For Ubuntu you don't need to specify the -t 

Second you’ll need to copy this key to the remote machine using a command such as:

scp ~/.ssh/id\_rsa.pub user@yourserver.com:

Lastly, log into the remote machine via ssh (using your password for the last time!) and use this command to add the newly generated key to the list of authenticated keys:

cat id\_dsa.pub >> .ssh/authorized\_keys

You’ll also probably want to delete the original key as well.

rm id\_dsa.pub

Finally, change file permissions on this file to 600.

chmod 600 .ssh/authorized\_keys

 

NB> For Ubuntu you will have to change the .ssh directory permissions to 700.

chmod 700 ~/.ssh

 

## Further Reading

[https://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id](https://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id)

 

### Articles

### NEVER MISS A NEWS UPDATE

- [Legal](https://exxa.tech/about/legal)
- [Privacy Policy](https://exxa.tech/about/privacy-policy)
- [Terms & Conditions](https://exxa.tech/about/terms-and-conditions)
- [Sitemap](https://exxa.tech/sitemap)

[LinkedIn](https://www.linkedin.com/company/exxa-tech)    |    [Twitter](https://twitter.com/exxatech)     |    [Facebook](https://www.facebook.com/Exxa.tech)                                            Copyright Exxa    