#!/bin/sh

mkdir $HOME/.ssh
chmod 0700 $HOME/.ssh
cp `dirname $0`/ec2_test1.pem $HOME/.ssh/id_rsa
chmod 0400 $HOME/.ssh/id_rsa

ssh-keyscan -t rsa localhost >> $HOME/.ssh/known_hosts
ssh-keyscan -t dsa localhost >> $HOME/.ssh/known_hosts
ssh-keyscan -t rsa 127.0.0.1 >> $HOME/.ssh/known_hosts
ssh-keyscan -t dsa 127.0.0.1 >> $HOME/.ssh/known_hosts

ssh ubuntu@localhost sudo /usr/sbin/sshd -p 443
