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

Knife-ec2 prematurely fails before SSH is even available. #671

Open
breisig opened this issue Oct 6, 2021 · 1 comment
Open

Knife-ec2 prematurely fails before SSH is even available. #671

breisig opened this issue Oct 6, 2021 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.

Comments

@breisig
Copy link

breisig commented Oct 6, 2021

For some reason, When I try bootstrapping a new server, It creates the VM but right away when it gets to the 'Waiting for sshd access to become available' line, it instantly fails within a second or two with "ERROR: Net::SSH::Disconnect: disconnected: Too many authentication failures (2)" even though SSH has not started yet on the server [usually takes a minute or two]. It just seems it tried connecting and failing too FAST even before the new VM wasn't loaded up yet.

Example command.

knife ec2 server create 10.4.2.46 -N mytestserver.server.com --image ami-12345 -f t3.medium --region ca-central-1 --ssh-key mykey --subnet subnet-d123455 -g sg-1234567 -E production -r 'role[tester]'  --ebs-optimized --cpu-credits standard --ebs-size 20 -A --server-connect-attribute private_ip_address --private-ip-address 10.4.2.46 --aws-profile myawsprofile --sudo --node-ssl-verify-mode none --ssh-verify-host-key never -U root --ssh-gateway [email protected]

Output

Waiting for EC2 to create the instance
Instance ID: i-0b12345678
Flavor: t3.medium
Image: ami-12345
Region: ca-central-1
Availability Zone: ca-central-1a
Security Group Ids: sg-1234567
AWS Tags: Name: mytestserver.server.com
SSH Key: mykey
T2/T3 Unlimited: Disabled

Subnet ID: subnet-d123455
Tenancy: default
Private IP Address: 10.4.2.46

Waiting for sshd access to become available
SSH Target Address: 10.4.2.46(private_ip_address)
ERROR: Net::SSH::Disconnect: disconnected: Too many authentication failures (2)

Versions

chef-client 17.6.18
Using latest Knife gem [knife (17.5.22)
knife-ec2 (2.1.4)

@breisig breisig added Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected. labels Oct 6, 2021
@breisig
Copy link
Author

breisig commented Dec 2, 2021

I think it's related with using a ssh-gateway and that it's not waiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

1 participant