system/notes/ssh.md

29 lines
379 B
Markdown
Raw Normal View History

2022-10-15 23:51:15 +03:00
# Get key for machine
```sh
ssh-keyscan <host>
```
If you want to get key for the current machine you can use the following code
```sh
ssh-keyscan localhost
```
2023-03-17 12:17:21 +03:00
# Generate new ssh key
2023-03-17 12:21:12 +03:00
```sh
2023-03-17 12:17:21 +03:00
ssh-keygen -t ed25519 -C "bob@example.com"
```
# Remove ssh key
```sh
gpg-connect-agent
```
```
KEYINFO --ssh-list --ssh-fpr
DELETE_KEY XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```