-
Notifications
You must be signed in to change notification settings - Fork 89
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
tugboat ssh not using ssh-agent? #160
Comments
By default, tugboat uses the user defined in your |
The
So this doesn't fix the issue. |
@rauchrob Can you try now with the latest release? (v1.3.0) |
Closing for now, if there's any update, feel free to re-open |
I have tested again with tugboat v2.0.0, without success:
When doing |
What SSH key are you using when you SSH regularly? I see there's an error saying it can't find the SSH key:
You might need to change the SSH key it uses in your ~/.tugboat file |
I have no file based SSH keypair at all. I have also just tried it after
without success, though. |
If you don't give ssh_key_path in the ~/.tugboat file, it defaults to using Can you give a verbose output of sshing into the both without tugboat (-vvvv) with all the sensitive stuff redacted (IP and the like) |
|
Can you try:
And tell me which one works? And when you find out which one works, try changing the ssh_key_path in your ~/tugboat file to point to that file, should work after that. |
None of them will work. As mentioned above, I have no file based SSH Key pairs at all, since my SSH Keypair is located on a Smart card:
SSH will connect to my running |
Ooooooh, now I understand, I missed that detail before. I've not heard of these before, they look pretty neat, I've been using a Yubikey for my machine, having SSH keys on secure hardware makes sense! 😄 So, I'm not really sure how to fix this, as I'm not super familiar with how smart cards interact with SSH. Basically, Tugboat does ssh by doing: options = [
"-o", "IdentitiesOnly=yes",
"-o", "LogLevel=ERROR",
"-o", "StrictHostKeyChecking=no",
"-o", "UserKnownHostsFile=/dev/null",
"-i", File.expand_path(env["config"].ssh_key_path.to_s)]
...
Kernel.exec("ssh", *options)` So it runs SSH from the terminal with the -i flag pointing to a key from your config file. How does the standard command line know to use the smart card key? |
Therefore I think you should remove the options |
By the way, I have tested removing this line from |
Maybe the option |
``` IdentitiesOnly Specifies that ssh(1) should only use the authentication identity files configured in the ssh_config files, even if ssh-agent(1) or a PKCS11Provider offers more identities. The argument to this keyword must be “yes” or “no”. This option is intended for situ‐ ations where ssh-agent offers many different identities. The default is “no”. ``` So when we have an ssh that is not in a path (such as using an ssh key located on a smart card), you can still ssh to it! 👍 Also updates specs for this change Closes #160
@rauchrob Can you test this is all working in tugboat 2.1.0? You'll need to remove the ssh_key_path from your config. |
@petems I can confirm it works now, nice work! I get some noisy debugging output, which could be stripped in future releases though:
|
Yeah, I'm planning on refactoring the logging from #202, and changing levels of logging and such 👍 |
I am storing my SSH secret keys on a smartcard, running
ssh root@<my-droplet-ip>
therefore runs fine without password. Howevertugboat ssh <my-droplet>
will fallback to asking the root password, which is not what I expected.Did I miss something or is this a Bug?
The text was updated successfully, but these errors were encountered: