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

Allow for optional selection of SSH identity when connecting #1291

Open
csc-gip opened this issue Dec 9, 2024 · 1 comment
Open

Allow for optional selection of SSH identity when connecting #1291

csc-gip opened this issue Dec 9, 2024 · 1 comment
Labels
enhancement New feature or request module:ssh

Comments

@csc-gip
Copy link
Contributor

csc-gip commented Dec 9, 2024

We store an identifier for ssh identities, so we should be able to use them when creating a connection instead of just trying all identities. There are usually limits for the number of tries.

private static String generateName(byte[] publicKey) {
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(publicKey);
String sha256hex = new String(Hex.encode(hash));
return "Identity@" + sha256hex;
} catch (Exception e) {

We also should order keys by an optional priority to be able to filter them so we can make a key-rollover easier.

@csc-gip csc-gip added enhancement New feature or request module:ssh labels Dec 9, 2024
@csc-gip
Copy link
Contributor Author

csc-gip commented Dec 9, 2024

c.f. DHICB-15654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module:ssh
Projects
None yet
Development

No branches or pull requests

1 participant