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

Can't parse ~/ssh/.config properly #61

Open
brho opened this issue Mar 2, 2022 · 2 comments
Open

Can't parse ~/ssh/.config properly #61

brho opened this issue Mar 2, 2022 · 2 comments

Comments

@brho
Copy link
Collaborator

brho commented Mar 2, 2022

Hi -

In my .ssh/config:

Host qemu
    Hostname 127.0.0.1
    User root
    Port 5555
    IdentitiesOnly yes
    IdentityFile ~/.ssh/db_rsa

I've tried HostName vs Hostname, removing IdentitiesOnly, etc. I can tell the file is being read (strace). I've also removed everything else from my .ssh/config other than that block.

I get:

$ ./cpu qemu bash
...
2022/03/02 17:17:23 getKeyFile returns "/usr/local/google/home/brho/.ssh/cpu_rsa"

and it looks like kf = config.Get(host, "IdentityFile") is failing.

Thanks.

@rminnich
Copy link
Member

rminnich commented Mar 7, 2022

I am seeing this too but I've been using .ssh/config for some time now in cases where it worked, @!@$#!@#$

@rminnich
Copy link
Member

rminnich commented Mar 7, 2022

here's an example of a working entry
host v
hostname 10.0.2.15
IdentityFile ~/.ssh/cpu_rsa
User root

This is using github.com/kevinburke/ssh_config, and I note:
// Get finds the first value in the configuration that matches the alias and
// contains key. Get returns the empty string if no value was found, or if the
// Config contains an invalid conditional Include value.
//
// The match for key is case insensitive.

Still not sure what's up here, but now I'm wondering: can you build with CGO_ENABLED=0 as a sanity test

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