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

Unknown ssh-ed25519 host key #29

Open
Spikeedoo opened this issue Jun 28, 2022 · 0 comments
Open

Unknown ssh-ed25519 host key #29

Spikeedoo opened this issue Jun 28, 2022 · 0 comments

Comments

@Spikeedoo
Copy link

I get the following message when I try to deploy to remote docker host from self-hosted runner. Private and public key are populated by GitHub action secrets. The private key is the id_rsa from the remote docker host. I have tried populating public key with various lines/parts of lines from known_hosts. I.e. 192.168.1.112 ecdsa-sha2-nistp256 <key> or 192.168.1.112 ssh-ed25519 <key> etc. Every time I run the action I get the following (replaced key bytes with my placeholder in brackets):

2022-06-27T17:56:26.3700370Z Registering SSH keys...
2022-06-27T17:56:26.5729539Z Agent pid 10
2022-06-27T17:56:26.6566995Z Identity added: /github/home/.ssh/id_rsa (/github/home/.ssh/id_rsa)
2022-06-27T17:56:26.6588114Z Add known hosts
2022-06-27T17:56:26.6623663Z Connecting to [email protected]... Command: docker-compose  --log-level debug --host ssh://[email protected]:22 -f docker-compose.yml -p asthtc-web up -d
2022-06-27T17:56:32.5626526Z Using configuration files: ./docker-compose.yml
2022-06-27T17:56:32.5929219Z Trying paths: ['/github/home/.docker/config.json', '/github/home/.dockercfg']
2022-06-27T17:56:32.5933239Z No config file found
2022-06-27T17:56:32.5937681Z Trying paths: ['/github/home/.docker/config.json', '/github/home/.dockercfg']
2022-06-27T17:56:32.5941265Z No config file found
2022-06-27T17:56:32.7181556Z /usr/lib/python3.8/site-packages/paramiko/client.py:835: UserWarning: Unknown ssh-ed25519 host key for 192.168.1.112: b'[insert key bytes here]'
2022-06-27T17:56:32.7184836Z   warnings.warn(
2022-06-27T17:56:32.7317323Z Traceback (most recent call last):
2022-06-27T17:56:32.7320669Z   File "/usr/bin/docker-compose", line 11, in <module>
2022-06-27T17:56:32.7324196Z     load_entry_point('docker-compose==1.25.4', 'console_scripts', 'docker-compose')()
2022-06-27T17:56:32.7330388Z   File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 72, in main
2022-06-27T17:56:32.7333360Z     command()
2022-06-27T17:56:32.7564384Z   File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 125, in perform_command
2022-06-27T17:56:32.7576151Z     project = project_from_options('.', options)
2022-06-27T17:56:32.7578681Z   File "/usr/lib/python3.8/site-packages/compose/cli/command.py", line 54, in project_from_options
2022-06-27T17:56:32.7580469Z     return get_project(
2022-06-27T17:56:32.7583639Z   File "/usr/lib/python3.8/site-packages/compose/cli/command.py", line 147, in get_project
2022-06-27T17:56:32.7585544Z     client = get_client(
2022-06-27T17:56:32.7588030Z   File "/usr/lib/python3.8/site-packages/compose/cli/command.py", line 118, in get_client
2022-06-27T17:56:32.7589785Z     client = docker_client(
2022-06-27T17:56:32.7591914Z   File "/usr/lib/python3.8/site-packages/compose/cli/docker_client.py", line 127, in docker_client
2022-06-27T17:56:32.7593728Z     client = APIClient(**kwargs)
2022-06-27T17:56:32.7595756Z   File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 165, in __init__
2022-06-27T17:56:32.7598178Z     self._custom_adapter = SSHHTTPAdapter(
2022-06-27T17:56:32.7600496Z   File "/usr/lib/python3.8/site-packages/docker/transport/sshconn.py", line 111, in __init__
2022-06-27T17:56:32.7602193Z     self._connect()
2022-06-27T17:56:32.7604219Z   File "/usr/lib/python3.8/site-packages/docker/transport/sshconn.py", line 119, in _connect
2022-06-27T17:56:32.7606083Z     self.ssh_client.connect(**self.ssh_params)
2022-06-27T17:56:32.7608204Z   File "/usr/lib/python3.8/site-packages/paramiko/client.py", line 435, in connect
2022-06-27T17:56:32.7609839Z     self._auth(
2022-06-27T17:56:32.7611729Z   File "/usr/lib/python3.8/site-packages/paramiko/client.py", line 764, in _auth
2022-06-27T17:56:32.7613405Z     raise saved_exception
2022-06-27T17:56:32.7617909Z   File "/usr/lib/python3.8/site-packages/paramiko/client.py", line 740, in _auth
2022-06-27T17:56:32.7619752Z     self._transport.auth_publickey(username, key)
2022-06-27T17:56:32.7622048Z   File "/usr/lib/python3.8/site-packages/paramiko/transport.py", line 1580, in auth_publickey
2022-06-27T17:56:32.7623952Z     return self.auth_handler.wait_for_response(my_event)
2022-06-27T17:56:32.7626646Z   File "/usr/lib/python3.8/site-packages/paramiko/auth_handler.py", line 250, in wait_for_response
2022-06-27T17:56:32.7628390Z     raise e
2022-06-27T17:56:32.7629952Z paramiko.ssh_exception.AuthenticationException: Authentication failed.

What am I doing wrong?

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