2 個答案
- 最新
- 最多得票
- 最多評論
1
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.
已回答 2 年前
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.
相關內容
- 已提問 2 個月前
- AWS 官方已更新 1 年前
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.