Featured Posts

Play Tetris Using Mac Leopard TerminalPlay Tetris Using Mac Leopard Terminal Terminal Tetris is actually part of the Gnu Emacs and is something you should able to do on any unix system that has Emacs on it.I attached text and video instructions.To...

Readmore

Automate a Remote Login Using SSH - LinuxAutomate a Remote Login Using SSH - LinuxTo do just that you need to create SSH Key Pair1. we need to use ssh-agent to create an SSH key pair.To do that run this command: ssh-keygen -t rsaWhen prompted...

Readmore

Free Google Wave InvitesFree Google Wave InvitesDo you really want a Google Wave Invite but don't want to pay $$$ on eBay???I got one for you....The deal is:I give you an Invitation and once you get it...

Readmore

Google DNS Test Results After using Google DNS for few days, And after running NameBench twice I found that:Google DNS is faster then Most if not All other DNS Servers.Check out the results:Bottom...

Readmore

Start Google Chrome in Incognito ModeStart Google Chrome in Incognito Mode I'm Using Mozilla FireFox as my default web browser But I like using Chrome for Private Browsing.Google Chrome doesn't provide an option to load Incognito by default so...

Readmore

Cool Geex Rss

Automate a Remote Login Using SSH – Linux

Posted on : 10-15-2009 | By : Cool Geex | In : Linux, Terminal

0

ssh-keygen

To do just that you need to create SSH Key Pair

1. we need to use ssh-agent to create an SSH key pair.

To do that run this command: ssh-keygen -t rsa

When prompted for a password, choose something long and secure.

After few secondsĀ  you should see a message like:

Your identification has been saved in ~/.ssh/id_rsa.

Your public key has been saved in ~.ssh/id_rsa.pub.

Now we need to add the public key (id_rsa.pub) to our web server. You can head in to the web server via FTP and cut and paste the info into ~/.ssh/authorized_keys.

Or The terminal way, execute this line, substituting your login info:

cat ~/.ssh/id_rsa.pub | ssh YourUserName@YourServer.com ‘cat >> .ssh/authorized_keys’

Notes:

1. For some versions of ssh, you may have to use the ~/.ssh/authorized_keys2 file.

2. you can also use dsa instead of rsa.

*** For RSA keys the minimum size is 768 bits and the default is 2048 bits.

*** DSA keys must be exactly 1024 bits as specified by FIPS 186-2.

Related posts:

  1. Google Public DNS – Is It Fast?
  2. Linux Process Control With HTOP

How To Link To This Page?

To link to this page, simply Copy and Paste the following code to your web page.

Write a comment