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}

相关文章:

  • 2021-05-19
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2021-08-27
  • 2021-07-02
  • 2022-02-19
猜你喜欢
  • 2021-09-04
  • 2021-11-14
  • 2021-07-08
  • 2021-06-14
  • 2021-09-09
  • 2022-02-07
  • 2021-10-24
相关资源
相似解决方案