ssh remove

main
Nguyen Tran Hau 2020-07-13 11:19:33 +07:00
parent 19e371ca56
commit 12e31f7bea
1 changed files with 13 additions and 1 deletions

View File

@ -25,13 +25,25 @@ ssh myserver
## SSH key
Remove keys in `known_hosts`:
```sh
# Remove all
rm -rf ~/.ssh/known_hosts
# Remove only 1
ssh-keygen -R remote_host
```
### Copy local key to server
Generate key:
```sh
ssh-keygen -t rsa -b 4096 -C "your@email.com"
```
Start:
Start `ssh-agent`:
```sh
eval "$(ssh-agent -s)"