ssh-keygen -o
ssh-keygen -t ed25519 -C "your_email@example.com"
eval $(ssh-agent -s)
ssh-add /home/username/.ssh/file-name
ssh-add -l -E sha256
ssh -vvvT git@github.com
file path: ~/.ssh/config
file content looks like
```ssh
Host hostname1
SSH_OPTION value
SSH_OPTION value
Host hostname2
SSH_OPTION value
Host *
SSH_OPTION value
```
example:
```ssh
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/<username>/.ssh/github-ed25519
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/<username>/.sshgithub-ed25519-another-account
```
link: https://stackoverflow.com/a/62842368 (actual solution)
link: https://stackoverflow.com/a/67869162 (config file values)
ssh config file path on linux: /home/[usename]/.ssh/config
ssh config file path on windows: C:\Users\\[User]\\.ssh\config
Host [git.domain.com]
User [user]
Port [number]
IdentitiesOnly=yes
PreferredAuthentications publickey
PasswordAuthentication no
IdentityFile /home/_USER_NAME_/.ssh/[name_of_PRIVATE_key_file]
ex:
Host github.com
User git
Port 22
IdentitiesOnly=yes
PreferredAuthentications publickey
PasswordAuthentication no
IdentityFile /home/_USER_NAME_/.ssh/github_ed25519
Try giving absolute path to IdentityFile inside config file.