question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

k8s-alpha create assumes that public ssh key contains filename

See original GitHub issue

Note: This error is only reproduced on mac.

The k8s-alpha plugin assumes that the public ssh key contains the filename, which I guess is not stable across different OS implementations. On mac, the default comment user@hostname, which does not match the key filename which the script checks for. As a result, the create command generates the warning “Your ssh private key must be added to your ssh-agent.” even if you have added the key. The workaround I used was to generate a key that the script accepted was

> ssh-keygen -b 4096 -t rsa -C "id_rsa"`
> ssh-add -K ~/.ssh/id_rsa
> linode-cli k8s-alpha create k8s --ssh-public-key ~/.ssh/id_rsa.pub

See Generating a new SSH key and adding it to the ssh-agent

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
asaubercommented, Mar 13, 2019

With another report of this issue, I was able to track down the exact cause.

https://github.com/openssh/openssh-portable/blob/master/ssh-add.c#L275 If a key added to an agent doesn’t have a comment, then the comment that’s stored is the filepath of the key.

My keys are in RSA format, which don’t have comments. The OPENSSH format is popular now, which always have comments which default to user@hostname.

So, my assumption in the plugin that I can grab the filename from ssh-agent -l is definitely not true.

I’ll work on a fix.

0reactions
asaubercommented, Mar 12, 2019

Hi @kengu, I believe we addressed this concern with #110

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up SSH public key authentication to connect to a remote ...
Set up public key authentication using SSH on a Linux or macOS computer · Filename: To accept the default filename (and location) for...
Read more >
How to Use ssh-keygen to Generate a New SSH Key?
Our online random password generator is one possible tool for generating strong passphrases. Choosing an Algorithm and Key Size. SSH supports several public...
Read more >
The Guide to Generating and Uploading SSH Keys - HostDime
If you currently have access to SSH on your server, you can generate SSH keys on the command line using the ssh-keygen utility...
Read more >
Use ssh-keygen to create SSH key pairs and more - TechTarget
SSH authenticates using public keys, and the utility ssh-keygen makes SSH key pairs possible. Find out how ssh-keygen works and what else it...
Read more >
Generating Your SSH Public Key - Git SCM
Many Git servers authenticate using SSH public keys. In order to provide a public key ... First, you should check to make sure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found