SSH To Box with .PEM

ssh-keygen -t rsa -b 2048 -v

Enter a file name for example “work” and accept other defaults. Two files will get generated, work and work.pub.

rename work to work.pem and put in

copy work.pub to the server you want to ssh to and append it to the file ~/.ssh/authorized_keys (create if needed)

edit your local ~/.ssh/config and add the following inserting the ip address and user name appropriately.

Host work
HostName <host ip address>
IdentityFile ~/.ssh/work.pem
User <user name>

Then to connect simply

ssh work
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s