gjbae1212 / gossm

💻Interactive CLI tool that you can connect to ec2 using commands same as start-session, ssh in AWS SSM Session Manager
MIT License
418 stars 51 forks source link

Error while trying to start a new session on version 1.2.3 #23

Closed jonasneves closed 3 years ago

jonasneves commented 3 years ago

I get the following error while trying to start a new session:

$ gossm-1.2.3 start
? Choose a region in AWS: us-east-1
? Choose a target in AWS: <some_instance>   (i-000000000)
[start-session] profile: env, region: us-east-1, target: i-000000000

Starting session with SessionId: <my_session_id>

SessionId: <my_session_id> :
----------ERROR-------
Encountered error while initiating handshake. Handshake timed out. Please ensure that you have the latest version of the session manager plugin.

The session manager plugin version I have installed in my system and for gossm are the latest: $ session-manager-plugin --version 1.2.30.0 $ ~/.gossm/session-manager-plugin --version 1.2.30.0

Note: I am able to start a session just fine with the AWS CLI command.

jonasneves commented 3 years ago

I disabled encryption of the session temporarily to test it and it worked. Looks like the same issue from a previous ticket I closed (https://github.com/gjbae1212/gossm/issues/11), it doesn't like my encrypted sessions.

eskp commented 3 years ago

Seeing the same issue with a custom KMS key and the latest version of everything - gossm (1.3.2), session-manager-plugin (1.2.54.0) and ssm-agent (3.0.655.0). Downgrading gossm to v1.0.5 I am able to connect successfully. Also able to connect with aws ssm start-session --target ...

satheesh1997 commented 3 years ago

Try adding the credentials to ~/.aws/credentials file and use that profile. It worked for me :)

gjbae1212 commented 3 years ago

Mayb fix it in gossm v1.4.0.