dahlbyk / posh-sshell

PowerShell helpers for SSH (previously part of posh-git.)
MIT License
143 stars 8 forks source link

Connection manager #2

Closed JeremySkinner closed 6 years ago

JeremySkinner commented 6 years ago

Implement a connection manager that allows working with ~/.ssh/config, similar to how stormssh works I'm thinking of the following commands:

Commands

Connect-Ssh

Prints a list of available connections defined in the config file and prompts for one. Once the user selects the one they want, passes the arguments over to ssh.exe

Add-SshConnection

Adds a new connection to the config file.

Parameters:

Edit-SshConnection

Parameters:

Remove-SshConnection

Parameters:

Get-SshConnection

Searches for a connection

Details:

These commands should support piping.

We'll need a parser for the ssh config file format. I couldn't find a .net implementation already, so I'm thinking about porting this one which is in javascript. Question:

JeremySkinner commented 6 years ago

Here's a .net implementation of an ssh config file parser I put together this afternoon: https://github.com/JeremySkinner/Ssh-Config-Parser. Could make use of this, or rewrite as native powershell.

JeremySkinner commented 6 years ago

Went with a powershell version of the config parser in the end rather than a .net implementation. This is done ready for 0.2.