ssh-known-to-config
v1.0.3
Published
This very simply takes an argument of an unhashed known_hosts file and outputs to stdout a basic ssh_config file.
Downloads
4
Readme
ssh-known-to-config
Simple utility to convert unhashed known_hosts into an ssh_config file. Generates a Host entry with the Port.
Install this globally and you'll have access to the ssh-known-to-config
command anywhere on your system.
npm install -g ssh-known-to-config
ssh-known-to-config ~/.ssh/known_hosts
It will take something like the following in your known_hosts...
[10.1.1.4]:666 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwZXj0M...
10.1.1.11 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDipsxRXOi+SuFgX...
And output something like this...
Host 10.1.1.11
Port 22
Host 10.1.1.4
Port 666