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

Skipping private key with passphrase without chance to enter it #199

Open
aronjanosch opened this issue Jun 11, 2024 · 0 comments
Open

Skipping private key with passphrase without chance to enter it #199

aronjanosch opened this issue Jun 11, 2024 · 0 comments

Comments

@aronjanosch
Copy link

Hi,

I'm currently not able to use mole because it just skips my key, because it says its passphrase protected.

Affected Version

2.0.0

Expected Behavior

Either asking for a passphrase or using the apple keychain when UseKeychain yes is present in the config.

Current Behavior

It just skips the authentication using key -> connection does not establish.

Steps to Reproduce

Here is my ssh config:
.ssh/config

Include config.d/*

Host *
  IgnoreUnknown UseKeychain

Host server0
  HostName 1.2.2.2
  User username
  IdentityFile ~/.ssh/id_ed25519

.ssh/config.d/test

Host *
  IgnoreUnknown UseKeychain,AddKeysToAgent
  UseKeychain yes
  AddKeysToAgent yes

Host server1
  HostName 1.2.3.3
  User user
  Port 22
  IdentityFile ~/.ssh/id_ed25519_test
  ProxyCommand ssh -W %h:%p server0
  ForwardAgent yes

And here is the command I used + Output. There servers get correctly identified from the config.
I think the problem is that for the jumphost (server0) I use a different ssh key without passphrase. For server1 I use a ssh key with passphrase.

mole start local \
    --source :5601 \
    --destination 1.2.3.4:5601 \
    --server server1
INFO[0000] instance identifier is c9e218f7
WARN[0000] invalid key. Skipping authentication using key.  error="ssh: this private key is passphrase protected"
ERRO[0000] error while starting tunnel                   error="error generating ssh client config: at least one working authentication method (key or ssh agent) must be present." tunnel="[channels:[[source=127.0.0.1:5601, destination=1.2.3.4:5601]], server:1.2.3.3:22]"
ERRO[0000] error starting mole                           error="error generating ssh client config: at least one working authentication method (key or ssh agent) must be present."

I hope you can help

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

1 participant