ReproNim / reproman

ReproMan (AKA NICEMAN, AKA ReproNim TRD3)
https://reproman.readthedocs.io
Other
24 stars 14 forks source link

cannot use EC2's PEM key in .ssh/config, any ideas? #556

Open yarikoptic opened 3 years ago

yarikoptic commented 3 years ago

weird thing is that if I specify via -i in cmd line -- it still complains but logs in:

$> ssh my-nitrc-gpu2
load pubkey "/home/yoh/.local/share/reproman/ec2_keys/my-nitrc-gpu2.pem": invalid format
Connection closed by 54.197.2.255 port 22

$> ssh my-nitrc-gpu2 ls
load pubkey "/home/yoh/.local/share/reproman/ec2_keys/my-nitrc-gpu2.pem": invalid format
Connection closed by 54.197.2.255 port 22

$> ssh -i /home/yoh/.local/share/reproman/ec2_keys/my-nitrc-gpu2.pem ubuntu@54.197.2.255
load pubkey "/home/yoh/.local/share/reproman/ec2_keys/my-nitrc-gpu2.pem": invalid format

=============================================================================
Welcome to the NITRC Computation Environment (NITRC-CE), version v0.50.0-LITE
Powered by NeuroDebian.
Go to https://www.nitrc.org/plugins/mwiki/index.php/nitrc:User_Guide_-_NITRC_Computational_Environment_Installed_Packages
to see the complete list of installed packages.

Create one NITRC-CE configuration at https://www.nitrc.org/my/ce_edit.php
and use it for all your NITRC-CE instances.

Happy Computing - The NITRC Team
=============================================================================

156 packages can be updated.
2 updates are security updates.

Last login: Tue Nov 10 17:48:05 2020 from 76.24.253.1
ubuntu@nitrcce:~$ logout
Connection to 54.197.2.255 closed.

$> tail ~/.ssh/config

Host my-nitrc-gpu2
  IdentityFile /home/yoh/.local/share/reproman/ec2_keys/my-nitrc-gpu2.pem
  Hostname 54.197.2.255
  Port 22

any ideas on why that could be @kyleam @chaselgrove ?

chaselgrove commented 3 years ago

Except for the "invalid format," this is what you would expect to see. The "connection closed" would happen as you've described unless your local username is ubuntu.