- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
It appears that ssh is trying to resolve the instance id instead of starting the proxy command from ~/.ssh/config
file. To allow SSH connections through Session Manager, the ssh configuration file must have a proxy command that starts a Session Manager session and transfer all data through the connection. Make sure that ssh config file for the logged in user ( in your Ubuntu machine) has following entry in it.
$ cat ~/.ssh/config
# SSH over Session Manager
host i-* mi-*
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
For more details, refer to the following documentation.
Yes, that resolved my problem. Actually, it should be configured on the local ssh configuration. Thank you. Also, the needed policy permissions were missing for the SSH connection through the session manager.
Here is a tool designed exactly for that purpose: https://github.com/ivoronin/ec2ssh
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 6 mesi fa
- AWS UFFICIALEAggiornata 2 anni fa
Hello,
Is there a chance that your instance was stopped at some point then you restarted it? Was it attached to an ElasticIP before stopping it? It could be that you IP address changed after starting your instance.