SecureCRT has claimed a special place in my heart. Developed by Vandyke, it is a full featured, Linux native SSH session manager packed with tons of features that a power user who manages hundreds or thousands of servers or network elements via SSH can appreciate.

When I first switched from Windows to Linux 10 years ago, there definitely were real gaps in available, stable software. Finding companies that sold and supported full featured software to Linux native users was even less. While today most software is available and supported on Linux, Vandyke’s SecureCRT back then was something I was happy to pay a license for.

Over time I started to rely on SecureCRT heavily. When you are managing hundreds or thousands of devices for yourself and clients, having to keep track of all the different hostnames, and jumpboxes, and special login scripts can become a pain. SecureCRT lets me completely automate all of this, while staying secure.

The one issue this reliance caused is when I’m not at my desk. If I’m out traveling, working remote, or just out and about and there is an emergency requiring access to a device, having to exchange IPs, remember which username and key that client has, which jump server I need to do agent forwarding with, it all becomes a nightmare. I needed a way to sync my sessions between my desk computer, my laptop, and any other device that made sense.

TLDR

The answer is Syncthing. Syncthing works great to keep multiple devices in sync with SecureCRT sessions, configuration, and credentials.

At the end of the day, all of the SecureCRT configuration, sessions, settings, credentials is encrypted and stored in /home/sajan/.vandyke.

Directory structure for SecureCRT (and SecureFX) sessions and configurations.

As you can see, it’s a pretty straightforward. Just need to get these files, all are text based, synced to my laptop.

First instinct was to just rsync them on a cron directly to the other device. This worked, but wasn’t very clean as it would obviously fail when one device was not powered on. It also meant I needed to expose SSH on both sides to get two way syncing.

Second attempt was to turn the directory into a git repository. Then on a cron, both devices pull from a private git server, commit any local changes, and push them back up to the git server. This worked quite well actually, checked the nerdy box, and provided the git server as a bonus backup.

The git solution still felt a little unclean and I just wanted to keep this directory on Device A completely in sync, bit for bit with a directory on Device B, while easily being able to add Device C. Then it dawned on me, that the peer to peer file sync solution Syncthing existed and is something I had written off in the past.

Syncthing seemed to pass all my benchmarks for me to install it on my system; Active development, active community base, respectable companies using it and are behind it, and installation methods that were sane, in this case an official package repository.

After some easy installation, and quick configuration of the SecureCRT directory, Syncthing was watching and keep track of changes within about 5 minutes of me even thinking about Syncthing.

On my laptop, I easily installed the daemon and got it running. All I needed to do was add the remote device, accept it, and complete the sharing.

Once everything was set, I had perfectly working two way sync of all configuration, sessions, and even SecureFX stuff between my two devices. I can be on the road, open SecureCRT, create a new session, edit another one, change some global options as I normally would. Then when I get home and open things on my desktop, it’s all done and synced within a minute or so.

I can think of a few other ways I could use Syncthing. It works really well, but for now all it does is keep my SecureCRT in sync across multiple devices. The only caveat is that it will only sync up when both devices are online, but that should’ve been obvious.

Show CommentsClose Comments

Leave a comment