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.

In some case, generated paths to each ssh private key in `/etc/ssh/config` will be mismatch to mount paths.

See original GitHub issue

Describe the bug

I couldn’t git push via SSH. I inspected and It is caused by invalid path to SSH key.

Che version

  • HEAD other: please specify

Steps to reproduce

As currently I’m not sure how to reproduce, I show my step.

  1. Open terminal
  2. ssh -vvv git@ssh.dev.azure.com
  3. Press Ctrl-C after SSL auth was failed.
  4. ls /etc/ssh/

Expected behavior

The goal is “git push is done with no error.”. In the viewpoint of “Steps to reproduce”, SSL auth is succeeded.

Runtime

  • kubernetes (include output of kubectl version) But It won’t depend on runtime.

Additional context

ssh tryes to find the secret in /etc/ssh/ssh-dev-azure-com/ssh-privatekey.

debug1: Trying private key: /etc/ssh/ssh-dev-azure-com/ssh-privatekey
debug3: no such identity: /etc/ssh/ssh-dev-azure-com/ssh-privatekey: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
git@ssh.dev.azure.com's password: 

But it mounted on the another path /etc/ssh/ssh.dev.azure.com/ssh-privatekey.

$ ls /etc/ssh
github.com  sshd_config        ssh_host_dsa_key.pub    ssh_host_ed25519_key      ssh_host_rsa_key.pub
moduli      ssh.dev.azure.com  ssh_host_ecdsa_key      ssh_host_ed25519_key.pub  ssh_import_id
ssh_config  ssh_host_dsa_key   ssh_host_ecdsa_key.pub  ssh_host_rsa_key

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
vparfonovcommented, Aug 8, 2019

I do not know if the keys generated in Che 6 are compatible with Che 7 (@vparfonov @vinokurig could you please shed some light on it?). Basically, in Che 7 one needs to generate keys via SSH plugin https://github.com/eclipse/che-theia/tree/master/plugins/ssh-plugin There is also a demo video https://youtu.be/72MDoJT05cY

Yes it doesn’t meter are keys generated in Che6 or Che7, should work both

@monaka could you update the issue description / title and specify that the problem you are facing is related to the SSH keys generated for Che 6?

0reactions
monakacommented, Aug 8, 2019

@vparfonov If my understanding is collect, the name of secret object must be matched [A-Za-z_][A-Za-z0-9_]*. But the mount path for it can be loose strict. Sometimes I’m also getting mixed up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

failed to add ssh key. message [invalid privatekey - You.com
The path to key should be the path to the private key id_rsa . ... eclipse/cheIn some case, generated paths to each ssh...
Read more >
SSH only works if I specify the key with - Unix StackExchange
As far as I'm aware, ssh only searches for keys with the name id_rsa , id_dsa and a few others which all start...
Read more >
Ssh-copy-id for copying SSH keys to servers
ssh -copy-id installs an SSH key on a server as an authorized key. Its purpose is to provide access without requiring a password...
Read more >
Documentation | - Terrascan
Terrascan is a static code analyzer for Infrastructure as Code. It can be installed and run in a number of different ways, and...
Read more >
OpenSSH/Print version - Wikibooks
A {{Goodbook}} template should be created to advertise it. The OpenSSH suite provides secure remote access and file transfer. Since its initial release,...
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