Skip to content

Commit

Permalink
Include id_ed25519, id_ecdsa in default identity files.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmds committed Dec 11, 2024
1 parent 8e134f9 commit c5da721
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ class SftpFile : Stream
}
class SshClientSettings
{
static IReadOnlyList<Credential> DefaultCredentials { get; } = [ PrivateKeyCredential("~/.ssh/id_rsa"), KerberosCredential(), NoCredential() ]
static IReadOnlyList<Credential> DefaultCredentials { get; }
= [ PrivateKeyCredential("~/.ssh/id_ed25519"), PrivateKeyCredential("~/.ssh/id_ecdsa"), PrivateKeyCredential("~/.ssh/id_rsa"),
KerberosCredential(),
NoCredential() ]
static IReadOnlyList<string> DefaultUserKnownHostsFilePaths { get; } = [ '~/.ssh/known_hosts' ]
static IReadOnlyList<string> DefaultGlobalKnownHostsFilePaths { get; } = [ '/etc/ssh/known_hosts' ]

Expand Down
4 changes: 3 additions & 1 deletion src/Tmds.Ssh/SshClientSettings.Defaults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ partial class SshClientSettings

private static readonly string[] DefaultIdentityFiles =
[
Path.Combine(Home, ".ssh", "id_rsa")
Path.Combine(Home, ".ssh", "id_ed25519"),
Path.Combine(Home, ".ssh", "id_ecdsa"),
Path.Combine(Home, ".ssh", "id_rsa"),
];

private const int DefaultPort = 22;
Expand Down

0 comments on commit c5da721

Please sign in to comment.