Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'spotty sh' with private ip address #112

Closed
Nomiizz opened this issue Apr 28, 2022 · 1 comment
Closed

'spotty sh' with private ip address #112

Nomiizz opened this issue Apr 28, 2022 · 1 comment

Comments

@Nomiizz
Copy link

Nomiizz commented Apr 28, 2022

I am using spotty to create spot EC2 instances in my own VPC. This means that the EC2 instance created does not have a public ip address. I pass in the correct instance profile and subnetid in spotty.yaml file and the EC2 instance comes up correctly. However, I am not able to connect to it with the 'spotty sh' command. If I don't pass in localSshPort: 22 option in the spotty.yaml file I get an error that the instance does not have a public IP address. However, with this option I get the error: [email protected]: Permission denied (publickey).

As a workaround I am looking up the private address of the instance through the AWS console and then connecting with:
ssh ubuntu@{private-ip-addr} -i ~/.spotty/keys/aws/spotty-key-spotty-us-east-1 and then further connecting to the container with docker exec -it container_name '/bin/bash'

Is there a better way to do this? Maybe connect directly to the container with 'spotty sh' from the host machine somehow

@apls777
Copy link
Collaborator

apls777 commented May 19, 2022

@Nomiizz Now it should be fixed in v1.3.3.

@apls777 apls777 closed this as completed May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants