summaryrefslogtreecommitdiff
path: root/doc/note/ssh
diff options
context:
space:
mode:
Diffstat (limited to 'doc/note/ssh')
-rw-r--r--doc/note/ssh/ssh-setup.txt12
-rw-r--r--doc/note/ssh/ssh-usage.txt5
2 files changed, 17 insertions, 0 deletions
diff --git a/doc/note/ssh/ssh-setup.txt b/doc/note/ssh/ssh-setup.txt
index 6a2812b..9f3dde2 100644
--- a/doc/note/ssh/ssh-setup.txt
+++ b/doc/note/ssh/ssh-setup.txt
@@ -7,6 +7,7 @@ SSH Setup & Key Management
- [Insane answer about key formats](https://stackoverflow.com/a/29707204/4415884)
+
## Create New Ssh Key
Create "path/to/key" and "path/to/key.pub" as a 2048 bit RSA with
@@ -16,6 +17,13 @@ Create "path/to/key" and "path/to/key.pub" as a 2048 bit RSA with
ssh-keygen -t rsa -b 2048 -f path/to/key -C "your comment"
```
+Create "path/to/key" and "path/to/key.pub" as an elliptic curve.
+
+```sh
+ssh-keygen -t ed25519 -f path/to/key -C "your comment"
+```
+
+
## Change Passphrase
@@ -26,6 +34,7 @@ ssh-keygen -p -f path/to/key
NOTE: Just hitting enter when asked for the new one will remove the passphrase.
+
## Inspect keys
Print public key hash:
@@ -46,6 +55,7 @@ Print detailed DER file content:
openssl x509 -in dumpcertfile -inform DER -text
+
## Export pub key in misc formats
ssh-keygen -e -f path/to/ssh2pub-or-privKey -m PKCS8
@@ -62,11 +72,13 @@ TODO to PKCS8:
ssh-keygen -i -f path/to/key.pub -e -m PKCS8 > path/to/pub.pem
+
## Remove obsolete entry from known_hosts
ssh-keygen -f path/to/known_hosts -R "example.com"
+
## TODO
-e This option will read a private or public OpenSSH key file
diff --git a/doc/note/ssh/ssh-usage.txt b/doc/note/ssh/ssh-usage.txt
index f9bc2a8..ff76f4c 100644
--- a/doc/note/ssh/ssh-usage.txt
+++ b/doc/note/ssh/ssh-usage.txt
@@ -30,6 +30,11 @@ request to "localhost:7080" on HOST.
ssh -o 'ProxyCommand ncat -p12345 %h %p' MY_SERVER
+## Get rid of bullshit warnings
+
+ -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null
+
+
## Run Cmd via jumphost
Source: "https://www.cyberciti.biz/faq/linux-unix-ssh-proxycommand-passing-through-one-host-gateway-server/"