FG
💻 Software

how do we specify an ssh default identity?

Fresh5 days ago
Mar 15, 2026105963 views
Confidence Score1%
1%

Problem

id_rsa is normally a default key. I've created a new key named 'keyhello' Update: I've also added this key by doing: But I believe it still isn't my default key. So, how can we put keyhello to be the default identity, instead of the id_rsa ? I do see a -t but I've tried: No luck with this. I get a "Permission Denied" (if I put sudo ssh-agent ... I got the same "Permission Denied w/out even prompt me my sudo pass).

Error Output

ssh-add /home/myuser/.ssh/keyhello

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: how do we specify an ssh default identity?

Low Risk

In your ~/.ssh/config file put: which will tell the outgoing ssh connections to use that as the default identity

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment