From 3d9af1dc93d81ffcc7746393d34c50a24fcfb147 Mon Sep 17 00:00:00 2001 From: Theodotos Andreou Date: Tue, 3 Jul 2018 23:29:19 +0300 Subject: [PATCH] Check if ssh key pair matches --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cb62123..e07832c 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,25 @@ ## vim -* Set tab to 4 spaces: `set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab` +* Set tab to 4 spaces: + ``` + set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab + ``` ## Shell -* Find my public IP: `dig +short myip.opendns.com @resolver1.opendns.com` +* Find my public IP: + ``` + dig +short myip.opendns.com @resolver1.opendns.com + ``` + +* Check if private and public ssh key match: + ``` + diff <(cat ~/.ssh/id_rsa.pub | cut -d' ' -f 2) <(ssh-keygen -y -f ~/.ssh/id_rsa | cut -d' ' -f 2)' + ``` References ------ -* https://stackoverflow.com/questions/1878974/redefine-tab-as-4-spaces \ No newline at end of file +* https://stackoverflow.com/questions/1878974/redefine-tab-as-4-spaces +* https://serverfault.com/questions/426394/how-to-check-if-a-rsa-public-private-key-pair-matched \ No newline at end of file