Affichage des articles dont le libellé est ssh. Afficher tous les articles
Affichage des articles dont le libellé est ssh. Afficher tous les articles

mardi 3 mai 2016

local ssh neighbors ?

A little bash function leveraging nmap .. mostly naive and fragile.
Until I learn how to do tcp|ip discovery.

neigh_ssh ()
{ 
    sudo nmap -v -p 22 --open --host-timeout 1 192.168.1.0/25 \
  | grep --color=auto -E -o "open port 22.*[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" \
  | grep --color=auto -E -o "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" \
  | sort \
  | uniq
}

vendredi 5 avril 2013

using custom rsa key filename with github

Out of paranoia I created my keys with '.gh' as {suf,in}fix. Github documentation mention a test command:

ssh -T git@github.com

Append `-i <public-key>` and retry.

e.g:

ssh -T git@github.com -i ~/.ssh/foo.gh.pub