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

use custom ssh key instead of copying all public keys #4

Open
seriousm4x opened this issue Apr 1, 2023 · 2 comments
Open

use custom ssh key instead of copying all public keys #4

seriousm4x opened this issue Apr 1, 2023 · 2 comments

Comments

@seriousm4x
Copy link
Contributor

seriousm4x commented Apr 1, 2023

Problem:
SSH will fail if there is no public key with default name.

debug1: Trying private key: /home/max/.ssh/id_rsa
debug1: Trying private key: /home/max/.ssh/id_ecdsa
debug1: Trying private key: /home/max/.ssh/id_ecdsa_sk
debug1: Trying private key: /home/max/.ssh/id_ed25519
debug1: Trying private key: /home/max/.ssh/id_ed25519_sk
debug1: Trying private key: /home/max/.ssh/id_xmss
debug1: Trying private key: /home/max/.ssh/id_dsa

Explaination:
All public ssh keys are copied to the vm on start and VmChamp will try to connect to the vm.
If the user doesn't have one of the default keyfile names, the connection will fail because ssh doesn't know which key to use.
For example my .ssh dir looks like this:

~/r/VmChamp ❯❯❯ tree ~/.ssh
/home/max/.ssh
├── arbeit
│   ├── config
│   ├── id_1
│   ├── id_1.pub
├── config
├── home
│   ├── config
│   ├── id_1
│   ├── id_1.pub
└── known_hosts

There is none of the default names and connection fails.

Solution:
It would be best to create a seperate ssh key somewhere at ~/.config/VmChamp/id_rsa and pass that to the ssh connection to use.

@wubbl0rz
Copy link
Owner

wubbl0rz commented Apr 1, 2023

it copies only the public keys https://github.com/wubbl0rz/VmChamp/blob/master/IsoImager.cs#L13

@seriousm4x
Copy link
Contributor Author

Ah yes, sorry. It only copies public keys.

Still, the root of the issue remains the same.

@seriousm4x seriousm4x changed the title use custom ssh key instead of copying all private keys use custom ssh key instead of copying all public keys Apr 1, 2023
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