Skip to content

[Login] Using ssh-identity file doesn't work for ed25519 keys #1182

@curzolapierre

Description

@curzolapierre

Steps to Reproduce

➜ ssh-keygen -t ed25519
...
# with a passphrase
/home/pierre/.ssh/id_ed25519_pierre_non_admin
...

# Print the public key
➜ cat ~/.ssh/id_ed25519_pierre_non_admin.pub
# Adding pub key to scalingo account

# Test the connection
➜ ssh -i ~/.ssh/id_ed25519_pierre_non_admin -T git@ssh.osc-fr1.scalingo.com
Enter passphrase for key '/home/pierre/.ssh/id_ed25519_pierre_non_admin': # <- passphrase
You've successfully authenticated on Scalingo, but there is no shell access

➜ scalingo login --ssh --ssh-identity ~/.ssh/id_ed25519_pierre_non_admin
       Trying login with SSH…
Encrypted SSH Key, password:  # <- enter the passphrase
 !     SSH connection failed.
 !     An error occurred:
       fail to login with SSH: fail to connect to SSH server: Invalid SSH key or password: not a valid signer

Workaround

Don't use --ssh-identity option, prefer to use ssh-agent directly:

➜ ssh-keygen -t ed25519
...
# with a passphrase
/home/pierre/.ssh/id_ed25519_pierre_non_admin
...

# Print the public key
➜ cat ~/.ssh/id_ed25519_pierre_non_admin.pub
# Adding pub key to scalingo account

# Test the connection
➜ ssh -i ~/.ssh/id_ed25519_pierre_non_admin -T git@ssh.osc-fr1.scalingo.com
Enter passphrase for key '/home/pierre/.ssh/id_ed25519_pierre_non_admin': # <- passphrase
You've successfully authenticated on Scalingo, but there is no shell access

ssh-add ~/.ssh/id_ed25519_pierre_non_admin

# Ensure ssh-agent manage the key
ssh-add -l

scalingo login --ssh

Note that if you have to change identity between session, you may need to remove other keys from ssh-agent

# list keys
ssh-add -l

# remove other
ssh-add -d <other>

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions