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

wrong public key is being offered when using multiple identities #114

Closed
emanelif opened this issue Feb 17, 2016 · 6 comments
Closed

wrong public key is being offered when using multiple identities #114

emanelif opened this issue Feb 17, 2016 · 6 comments
Assignees
Labels

Comments

@emanelif
Copy link

consider the following config

hosts:
    foo:
        Hostname: hostB
        IdentityFile: ~/.ssh/a
    bar:
        Hostname: hostA
        IdentityFile: ~/.ssh/b

ssh foo/bar leads to Permission denied (publickey). because the wrong public key is being offered

is that my fault, intended behaviour or assh's fault?

@moul moul added the Bug label Feb 17, 2016
@moul
Copy link
Owner

moul commented Feb 17, 2016

Hi @emanelif, thank you for your feedback,

Your configuration file looks good, I need to do some tests to figure out where the issue is

@moul moul self-assigned this Feb 17, 2016
@moul
Copy link
Owner

moul commented Feb 18, 2016

I think #116 fixed this issue too, can you give a try and tell me if both of the issues were addressed ?

@emanelif
Copy link
Author

I hope I used the correct version. go get -u github.com/moul/advanced-ssh-config/cmd/assh should do it, right?
ssh foo/bar is not working then: Permission denied (publickey).


edit1: ssh foo using bar as a gateway (gateway set in config file) is working now. thanks!


edit2: this might be a solution:
i need agent forwarding, when using the proxy command and have to load the keys into the agent first

@moul
Copy link
Owner

moul commented Feb 18, 2016

Yep, go get -u github.com/moul/advanced-ssh-config/cmd/assh will fetch and compile the latest version in your $GOPATH/bin directory, then you need to have $GOPATH/bin in your $PATH or call the binary using its absolute path to be sure to run this version


response to your edit1: :)


response to your edit2: the way assh is working do not requires agent-forwarding (I personnaly disabled it globally for security reasons).

assh won't call ssh hosta -- ssh hostb,
but ssh hosta -- netcat hostb 22 and will use this netcat socket to perform a new ssh connection from the assh' host

@emanelif
Copy link
Author

everything works fine now.

@moul
Copy link
Owner

moul commented Feb 19, 2016

perfect :) thank you for your feedbacks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants