Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.
/ sshconfig2iterm Public archive

Convert your SSH Config files to iTerm Dynamic Profiles

Notifications You must be signed in to change notification settings

derimagia/sshconfig2iterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#sshconfig2iterm

This will convert ssh config files (located at ~/.ssh/config) to iTerm2 Dynamic Profiles.

Because this is for iTerm, this will only work on Mac.

To install, run:

npm i -g sshconfig2iterm # Install it

sshconfig2iterm # Generated and print out a iTerm2 dynamic profile from the file found at ~/.ssh/config
sshconfig2iterm --save # to save the profile to ~/Library/Application Support/iTerm2/DynamicProfiles/profiles.json

Example Config Mapping

~/.ssh/config
Host sample # Example Server
  #Tags server, example
  User testuser
  HostName example.com

Will convert to:

#####profile.json

{
  "Profiles": [
    {
      "Guid": "sample",
      "Name": "Example Server",
      "ShortCut": "",
      "Custom Command": "Yes",
      "Command": "ssh sample",
      "Tags": [
        "server",
        "example"
      ]
    }
  ]
}

The Name is first taken from the '#Label' paramter. If this isn't found it'll grab it from the Comment on the same line of the host. It falls back to the Host parameter.

About

Convert your SSH Config files to iTerm Dynamic Profiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published