Friday, September 5, 2008

Connecting to EC2 from iSSH on the iPhone

I've been debating buying an SSH app for my iPhone for some time, but wanted to wait until I found one that supported key based authentication so I could connect to EC2 instances.  After careful evaluation, I decided that iSSH looked like the best one to try out, and so I purchased it from the iPhone app store yesterday.

iSSH has a great little feature to generate it's own key and then transfer that key to any machine you want, but it requires that you know the password for that machine.  When it comes to EC2 instances, I've never used a password and to my knowledge, there isn't a user account with a password on them.  Problem.

After posting on the iSSH google group asking if there was going to be a way to transfer a key to iSSH, Chris Jones responded that I might be able to connect if I could associate multiple keys with my AWS account.  I looked into this and discovered that, no, Amazon does not let you associate multiple X.509 certificates with an AWS account.  However, in this process, I realized that there wasn't anything stopping me from adding iSSH's public key to the authorized_keys file on the machine I wanted to connect to.

Here's the steps:
  1. If you don't have one already, install a SSH server on you computer.  I have a macbook pro running OS X 10.5, so all I had to do was enable remote login from the System Preferences, which enables the SSH server under the hood.
  2. Use iSSH's transfer function to transfer the iSSH key to your computer.
  3. Copy the iPhone iSSH key from ~/.ssh/authorized_keys (if you have multiple, it will be indicated with a comment following the key of the type "iphone-rsa-key-<SOME_NUMBER>")
  4. Add the key to the ~/.ssh/authorized_keys file of the EC2 instance you want to connect to.

Viola! Key-based authentication allowing iSSH to connect to an EC2 machine, or any machine for that matter.  If you chose to have iSSH use a password/passphrase when creating its' key, you'll have to enter this whenever you connect, but that's probably a good thing in case you lose your phone...

15 comments:

mchristoff said...

woah! freakin awesome. nice post

philip said...

Thanks for this, also works for TouchTerm for the iphone

Chris said...

Newer versions of iSSH don't require any key imports on the AWS instance. You can import the text of the pem that AWS created (I just copy/paste) in the iSSH app -> General Settings -> Import Key. It works great.

Grant Rice said...

This is even possible with the jailbroken iPhone and the Cydia being installed on it. Many thinks this to be an incorrect way but for me this did worked and was completely worthable.

aneka resep kue said...

very helpfull and inspirative, thanks sir resep kue praktis

furniture jepara said...

This is a great article, Thanks for giving me this information. Keep posting
Mebel Jepara Murah :
Mebel Jepara Online :
Kursi Tamu :
Mebel Jepara Minimalis :
Mebel Jepara Online :
Mebel Jepara :
Mebel Jati :
Mebel Jati Jepara :
Kursi Tamu Jati :
Furniture Jati :
Karya Priboemi Jepara :
Kursi Tamu Jati :
Furniture jepara Online :
Mebel jepara
Mebel Jati
Mebel Jepara :
Mebel Jepara Murah
Mebel Minimalis
Meja Makan Minimalis :
Kursi Tamu Mewah
gebyok jepara
Meja Makan
Tempat Tidur Jati

jowdjbrown said...

We've all bought not less than a single cell phone every single, correct? We have likely acquired about 3 or 4 presently, which counts offering your aged Nokia 3310 towards your Mum a few years ago.But now the earth has modified, and from Apple to Samsung to HTC to some host of up-and-coming names, picking your following greatest smartphone is really a challenging activity.This really is wherever we allow it to be quick: we comprehensively check countless top smartphones and possess identified the ten best you are able to spend your money on.mobile with prices

jual furniture said...

kamar tidur anak
kamar tidur
kamar tidur minimalis
kursi makan
kitchen set
sofa tamu
gazebo
table tv

dipan klasik
kursi pantai
kursi louis
kaligrafi
dipan rococo
kursi rococo
kursi sudut
kursi tamu minimalis

sofa klasik
set kursi makan
meja rias
meja kantor
meja belajar
lemari pakaian
lemari buku
box bayi

mengenali gejala kolesterol tinggi said...

ew: 14 junk, folderal, mengenali gejala kolesterol tinggi No matter you happen to be to obat kolesterol venture to Michael Kors Outlet Uk the particular nighest store or maybe obat eksim gatal di dada a official meal, b is essential in orde e fancywork obat kolesterol di apotik volition professionally to do the work. And so for the

http://distributorherbal.web.id/ said...

wah infonya menarik untuk dikunjungi, terimakasih banyak. ditunggu juga informasi yang lainnya ya http://distributorherbal.web.id/

Miftahchur Ridlo said...

Tempat Tidur Mewah

Tempat Tidur Minimalis

Tempat Tidur

 

joglo jepara said...

Kursi Minimalis
Kursi Tamu Minimalis
Kursi Tamu
Meja Makan
Kursi kantor
Furniture Minimalis
jual meja kantor
meja kantor terbaru
set ruang kantor
tempat tidur ukiran
furniture terbaru
meja makan duco
tempat tidur anak
tempat tidur tingkat
meja makan mewah
kursi tamu
toko furniture
furniture jepara
jual tempat tidur
meja resepsionis
meja rapat
kursi kantor direktur
set kursi tamu mewah
tempat tidur mewah
set ruang kantor
meja kantor terbaru
meja kantor pejabat
Kursi Tamu
set meja kantor
Harga Kursi Tamu
meja direktur
Toko Furniture
Sofa Murah
Furniture Murah

Miftahchur Ridlo said...



Tempat Tidur Terbaru
Toko Tempat Tidur
Tempat Tidur Anak
Tempat Tidur Dewasa
Tempat Tidur Jepara
Tempat Tidur Terbaru
Tempat Tidur Mewah
Tempat Tidur Murah
Tempat Tidur Minimalis
Tempat Tidur Ukiran
Tempat Tidur Klasik
Tempat Tidur Antik
Tempat Tidur Mahal
Tren Tempat Tidur
Set Tempat Tidur
Set Tempat Tidur Anak
Set Tempat Tidur Mewah
Jual Tempat Tidur
AnekaTempat Tidur

xjd7410@gmail.com said...

insanity workout
louis vuitton outlet stores
adidas originals
michael kors outlet
coach factory outlet
replica watches
toms shoes
gucci handbags
louis vuitton handbags
coach outlet store online
timberland outlet
louis vuitton handbags
kate spade outlet
oakley sunglasses
oakley sunglasses
cheap jordans
oakley vault
burberry bags
air jordans
coach outlet store online clearances
beats solo 2
lebron james shoes
coach outlet store online
tory burch outlet
adidas ultra boost
cheap ray ban sunglasses
hollister shirts
ralph lauren polo
coach outlet store online clearances
chenyingying20160806

Pervez Joarder said...

This info raises the lighting effects by way of that you can rate reality. My spouse and I like these types of web page. Now moreover click this cash advance carson Kind regards associated with providing valuable files.