Using ssh connect to Amazon EC2 instance
Using ssh to remote login instance in EC2:
xxx@xxx-Lenovo-Product:~$ ssh -i /home/xxx/Documents/privatekey/west.pem ubuntu@x.x.x.x
The output is below:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/xxx/Documents/privatekey/west.pem' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /home/xxx/Documents/CloudFloorWestPem/cloudfloor-west.pem
Permission denied (publickey).
Look for the workaround from internet, and find this maybe related with permission for other group/users, then execute command below:
xxx@xxx-Lenovo-Product:~$ chmod og-r /home/xxx/Documents/privatekey/west.pem
xxx@xxx-Lenovo-Product:~$ ssh -i /home/xxx/Documents/privatekey/west.pem ubuntu@x.x.x.x
Linux ip-10-168-75-242 2.6.35-24-virtual #42-Ubuntu SMP Thu Dec 2 05:01:52 UTC 2010 i686 GNU/Linux
Ubuntu 10.10
In the Elasticfox, we need to modify 'SSH Arguments' in 'Tools', set x /usr/bin/ssh -i "${key}" ${user}@${host} to -x /usr/bin/ssh -i "${key}" ubuntu@${host}