Creating a SSH Connection Manager for Windows

Ok, i’ve now finally accepted my faith and am running Windows 10 at work. With my company going full in on Officce 365, Sharepoint and such, working with Linux bacame more and more of a hindrence. I was able to do everything i needed to, but often i would spend a quarter of my time working around stuff. On WIndows 10, all my needed, company provided, Applications just work as intended.

With that said, i’m still spending around half or more of my day working with Linux Servers. And while the new Terminal is really nice, i miss a bunch of stuff that Linux has great applications for. Especially split terminals and a decent way to organize and manage a whole bunch of SSH Sessions is something i’m missing. And while things like Termius are nice, i’d prefer something not electron based, and not attached to an account or subscription.

Soooo. Long story short, this has been on my mind for some years. And after reading that recent “Get it done” thread, i thought i’d finally tackle that need of mine.

I’m planing to make this a UWP app. I’ve worked with Visual Studio before and made a small Application that gets data from an SQL Server and automatically builds a browsable Tree out of it. So i already managed to produce a functional Program for windows.

Fluent Design and UWP are new to me, but i don’t feel like developing a webapp (shudder) or something “legacy”.
Additionally, i’ve been putting of learning the basics or rust for some time. Since MS is planing to move to rust too, i thought this might be as good as a chance as i can come up with.

Finally, the new Terminal from MS is 1. open source and on Github and 2. already a UWP App. So i might be able to borrow some stuff from there.

I’m pretty sure this won’t be done “in a month” as the original thread suggested, but i’m commited to get it done. And i’ll try to keep a blog kind of thing going in this thread.

Please keep in mind, that I’m not a trained programmer, Windows Dev or such. I’m just a guy that like writing code in his free time. And i’m 100% sure i’m 200% underestimating the scope of this Project. None the less, here’s the Plan for stage one:

  1. Get the Project set up. Visual Studio Project with github sync and making a Blank UWP App Appear (that’s the easy part, as i’ve done this several times).

  2. Basic layout for a 1 window, 1 session at a time, SSH Manager.
    2.1 This should include a side menu for selecting Entries, Some way to safe Entries Data and a button to act upon a seleted entry. Just trying to get the hang of Fluent Design here.
    2.2 All Data for the entries will be done by hand for now. No Settings page or such.

  3. The Terminal part. Get a single usable cmd-style terminal to work. No clue if there are done parts, librarys, or if i end up pasting a bunch of stuff from the current new terminal from MS. I want a single Terminal next to my list and be able to input generic cmd type commands.

I think that’s it for “Stage One”. A working Terminal would be a great accomplishment and is likely the biggest hurdle of this Project. After that i’ll start adding functionality (Managing Users and SSH Keys, multiple Sessions at once, Split View etc.).
All of this will go on github and I’m happy for any recomendations for features you think would be usefull or tips you can give to make this journey easier.

And finally, this is planned as a clean, fast app. I’m not sacrificing performance for features. Within the capabilities of a native UWP app, speed is priority 1. Especially for a terminal.

Feel free to comment, give input or call me a mad man. But i’m commited to start, and finish this project.

2 Likes

You might be interested in looking at Microsoft’s new terminal for inspiration.

1 Like

Yes, that’s what i was talking about. I already use it and was able to create two profiles that automatically start ssh to two servers i use often.
It’s still very beta but works great so far. I’ve already pulled the repo and will take a look at how this thing works later at home.

Not sure yet if it would be easier to add features to that, or take the terminal part from it and do the rest from scratch…

1 Like

To encourage myself, i’d like to check of the first item on my list:

I’ve succesfully set up a gitlab repo, got gitlab to work in VS2019 and managed to get a Project Template for a UWP App to work in there.
No on to getting an idea of how Fluent UI works :wink:

For Anyone interested, here’s the repo: https://gitlab.com/domsch1988/sshconman

1 Like

http://ttyplus.com/multi-tabbed-putty/ - May be what you want? Unsure on displaying many connections though; Don’t have a ton of Linux servers to manage :wink:

Mobaxterm sounds like something you could use in the mean time.

Thanks for the suggestions guys. I really appreciate them. Both options are really feature rich and technically do everything i need. I’ve also used putty for quite some time.
But they all feel rather old and cumbersome to use for the “simple” task of managing some ssh sessions. I’m just looking for something, that feels more modern and fits in with Windows 10. Until then, i’m fine with my batch script to launch a “Selection Menu” for Sessions and putty.

After a lot of fiddling, i’m happy to share the rough first layout i could come up with for a “Main Menu” type of deal. This is the first Fluent Design app i’ve ever done, so it’s far from perfect. I’m still getting the hang of all the controlls and the options they offer. The Idea is to have “Groups” in the side navigation and then a Overview of Servers on the right, with an optional “Live View” for those connected.

Feel free to throw any idea you might have at me as I’m shuffling a bunch of stuff around. I’m also looking into adding a “List View” as an option instead of the Grid View.

2 Likes

So, yesterday was the day i realized what i’ve taken on…

I tried getting SSH.Net to work, but this resulted in a Socket error. Also, i realized this wouldn’t be a great idea for a terminal application.

I cloned the Windows Terminal Code and tried looking into it. Sadly it’s writen in C++, not C#. Now i need to figure out if i can make those work together. Plus i need to find the parts that actually make up the terminal. Not easy at all.

So, no major progress. I’m now thinking to make the goal for Stage 1 to launch a new CMD window with SSH Running. This should be much easier as a first step, would give me most of the management options for Connections, but leave the Terminal and Window Management Part out of that for now.

Also, Rust is a no go. Looked into it, but we’re not at a point where you can just throw some Rust code in there and make it work. So, C# it is.

Last but not least, i’ve decided i won’t ever deal with Passwords.

  1. No one should be using Passwords for SSH
  2. I don’t want to deal with having to securely store Passwords. WIth small Projects, that’s bound to fail.