27 lines
432 B
Markdown
27 lines
432 B
Markdown
---
|
|
gitea: none
|
|
include_toc: true
|
|
---
|
|
# SSH
|
|
|
|
## SSH als root mit fremden key
|
|
|
|
```
|
|
sudo ssh -i /home/user/.ssh/id_rsa" user@192.168.0.72
|
|
```
|
|
|
|
über Jumphost:
|
|
|
|
```
|
|
ssh -o ProxyCommand="ssh -W %h:%p -q ubuntu@jumphost-xxx.cloud" ubuntu@10.5.2.44
|
|
```
|
|
|
|
## Generate public key from private key
|
|
|
|
In case you only have the private key, you can generate the public key like this:
|
|
|
|
```
|
|
ssh-keygen -f ~/.ssh/id_rsa -y > ~/.ssh/id_rsa.pub
|
|
```
|
|
|