SSH in Windows the Linux Way

Everyone that uses Windows ends up using putty, which bothers me because putty (and it’s fork, kitty) has its own separate program, with its own terminal. I’m used to being in the command line doing whatever it is.

These days my console is ConEmu. If you’re suffering through the stock powershell console, I highly recommend trying it out along with PSReadLine. Once you’ve set those up you’ll start to have a console closer to the one you loved in Linuxland (if that’s what you’ve longed for).

For ssh, there are a couple options:

  • Install MinGW+MinGW-Get
  • Install Cygwin with openssh.

You may have one of these things installed. If not it’s easy enough to use chocolatey to install them.

You’ll want to verify the ssh your %PATH% is directing you to. MinGW-Get, Conemu, and Github will all install ssh for you and it may be unclear which one you’re using:

which ssh

If you’re a powershell user you may want to set an alias to the ssh you prefer in your Profile.ps1. I prefer the cygwin one, but of course it’s your choice.

set-alias ssh C:\cygwin64\bin\ssh.exe

ssh configs

If you use cygwin, you can edit your ssh configs in:

C:\cygwin64\home\$ENV:USERNAME\.ssh\

Git’s ssh will look for your things in:

C:\Program Files (x86)\Git\etc\.ssh\
 I ended up using procmon from Sysinternals to find these config locations, which for you Linux people does a lot of the same thing that lsof does. Enjoy!
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s