Installing a Windows SSH server.
Hi everyone, Leo.
Notenboom here for AskLeo.com. If you
don't know what SSH is, you are more than free to move on along.
Because in this video, honestly, I'm capturing something that I discovered
for myself a couple of days ago that I suspect a lot of people don't know about.
It's fairly geeky.
It is something that folks who administer
machines have often wondered about and asked for, and I discovered that it exists
in places that I didn't even realize existed.
So here's the deal.
As you can imagine, I spend some amount of my time
administering web servers. Servers like the Ask Leo server or some of the other
servers that I use, both for other websites or for some friends.
The bottom line is that this is all server level stuff.
And as it turns out, while some of it is definitely
user interfaces that you get to via a browser or through some other tools,
a lot of it and I do mean a lot of it is done at the command line level.
Now, all of those servers that I've just
been talking about tend to run Linux, which means accessing them at the command
line level is incredibly easy, to be honest.
Whenever I administer again, the Ascaleo.com server,
I fire up a command line interface to the server from my desktop here at home.
The same is actually true for my Mac that I have down in my basement.
If I want to do something on that Mac,
depending on what it is I need to do, I can either do a remote desktop kind
of session to it, or if all I need is a command line.
Again, I can fire up a remote command
prompt on that Mac and access it here from my desktop.
In both of those cases, I use a tool called SSH
on each of those machines on my servers and on my Mac, there is something called
an SSH server that is running that is basically listening for connections.
And then I use an SSH client that basically connects to that server.
That SSH server opens up the pipeline and sends the information back and forth.
The neat thing about SSH is that it is completely encrypted,
so there's no possibility of sniffing what's going on between the program I'm
running on my machine and the server to which I'm connecting.
Now, Windows has had a command prompt since day one.
In fact, the command prompt predates Windows, right?
Msdos is essentially what turned into Windows own command prompt.
But accessing just the command prompt remotely has always been a bit of a pain.
There have been some tools in the past
that would kind of sort of let you do it in a kind of a backhanded way.
The more common way to access pretty much any Windows machine remotely is to use
some kind of remote access software, either the software that's installed
in Windows or the software that you might get from somewhere else.
Tools like Team Viewer or Chrome's,
Remote Desktop or Remote PC, or any of a number of different solutions.
As it turns out, I discovered that Microsoft provides
an open SSH server that you could install on Windows.
It's just not obvious that it exists or where to find it.
So I'm going to show you where and how.
Right now, here's my Windows Ten machine.
What I'm going to look for or search for are optional features.
And you can see here there's something called Manage Optional Features.
I'm going to click on that and it brings
up the Settings app on the optional features page.
And there's a number of optional features down here that we could look at.
Remove whatever, do whatever you like with those.
The trick here is this add a feature blank.
I'm clicking on that.
And there's a number of things that yes, I understand those would be optional.
I don't need Arabic scripts or Bangalore or Canadian Aboriginal.
I mean, those kinds of things are just things that they should be optional.
People that need them need them,
and that's great that they're here, but people that don't need them never
really need to have them taking up space on their system.
Here's the one that we didn't know existed
until just a day ago, and apparently it's been around for quite some time.
I'm going to go ahead and check that and click on Install.
And off it goes.
Installing an OpenSSH server.
Now what good is this?
Well, I'm going to fire up here in just a second in a different window.
My favorite SSH tool called Putty.
Putty is very well known across the administrative and technical community.
There are SSH command line tools, and those will all work.
Don't get me wrong, there's nothing special about Putty in this case.
It's just a tool that makes it relatively easy for me to show you what's going
on without going to yet another command line.
So OpenSSH Server has completed installing.
It is presumably running, and we're going to find out about that in just a minute.
So what you're going to see me do here?
I'm actually dragging in the Putty
configuration from a different window, so it's not actually running
in the Windows system that you're looking at right now.
Unfortunately, the virtual machine set up
that I use prevents me from SSH into the machine that we've just turned SSH on.
So I can't show you exactly what that looks like.
But since this is something I've done for myself,
I can show you what it looks like if I connect to one of my other machines.
So from the machine here, we're going to connect to another machine
I have on my network called NotenFrame.
It's actually my laptop that I take with me.
So if I hit Open, you can see it's asking me to log in.
I'm going to log in with a local machine
account that I have created for that machine.
And there we are, the Windows command prompt,
the Windows administrative command prompt, and in fact at this point I can do
whatever I want to on that machine via the command prompt.
Now there are a couple of caveats here.
Any tool that throws up a non textual or non command prompt bit of user interface
like perhaps a dialog box asking for confirmation is not going to show.
You're only looking at the command prompt. Anything graphical is going to show up
on the actual screen of the computer to which we are connected.
But as long as you can constrain yourself
to using only command prompt based tools, this is a very quick way to, once it's set
up, to remote-to any number of different machines that you might have on your local
network without having to go through the pain of a full remote desktop session.
The other caveat is that what I'm showing you here is all on my local network.
All of these machines are directly visible, one from another.
It would in theory be possible to do this
across your router from the network or somewhere else on the internet.
That would require what's called Port forwarding to be enabled for Port 22.
As it turns out,
the SSH Port for that to be enabled on your router and then have
that forwarded to the specific machine that you want to connect to.
That is well beyond the scope of what I intend to cover today.
The other caveat that I want to throw out is I've just scratched the surface.
One of the things that I've noticed about the OpenSSH server that we just installed
on my Windows machine here is that I can't find any user interface to control any
of the settings. Which is not that surprising.
It's a pretty advanced tool to begin with.
My assumption is that there probably are
random settings like perhaps even changing the Port that it listens to.
A very common change used with
SSH are probably registry settings somewhere.
Again, I haven't touched those, I haven't scratched the surface of this,
but I at least wanted to make it clear and visible that indeed Microsoft Windows
does have an Open SSH server provided by Microsoft with a very simple
installation and once it's installed it's actually pretty easy to use.
I hope that was helpful for all of my fellow SSH geeks out there.
For updates, for related links, for comments and more, visit
14304 eight.
I'm Leo Notenboom and this is Ask Leo.com. Thanks for watching.