How to SSH into Windows from Windows (and copy files remotely)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'm going to show you how to ssh into another windows machine from a windows machine and actually this will work if you're on a mac going to windows or even a linux going to windows so let's go ahead and get on into the tutorial here okay so i'm on a windows machine right now what we're going to do is check to see if we have ssh installed so i'm going to open up a command prompt and do where ssh so because it comes back with the ssh executable that means i do have it installed but if that's not the case for you in order to install it simply open up your settings app go to apps under optional features click on that and then add a feature up here type in open ssh and you'll see open ssh client here click that install it and then it will show up down below like here in the installed features list so how do we ssh into a remote server well let me show you what my remote server looks like so i'm going to open up the remote desktop connection to this remote server at this ip address this is another windows machine running in a data center somewhere i think in germany this one so we're going to connect to that and log in and there we go so this is our remote computer right here and then in the background this is our local computer on the remote server let's set up ssh let's make sure an ssh server is running so the quickest way to check that out is to open up powershell as an administrator this is not the only way but just to check it out real quick there is a command that you can run that looks like this it's get windows capability where object name is like open ssh so if we execute that it'll come back and say the client is installed but the server is not present we need the server to be able to remote into so how can we do that similarly we can go to the settings on the remote computer open that up go to apps optional features and then i'm going to add a feature this time open ssh server so we'll click that install that'll install who knows maybe a minute we'll fast forward through that okay and just a bit later we see that we have open ssh server installed so we can get out of here and right now it's installed but it's not running so let's go ahead and allow it to run and we can do that in powershell again start service sshd sshd for daemon hit enter and that's going to start it up now every time you reboot your computer it will not automatically bring up the ssh server if you want that to happen automatically then you can execute this command right here okay so now we are ready to execute our ssh command to go from our local computer to our remote computer and that is simply going to be ssh the username excuse me so the username of the remote user is administrator that might be different for you at the ip address of this remote connection which you can see is right here so that's going to be 161.97.70.200. hit enter and it's going to ask for the password for that user and i have that noted over here so i'm going to copy that paste it in hit enter uh let me try this i'm going to right click edit paste hit enter and now we are logged into the remote server let me prove to you that i'm logged in via ssh to the remote computer okay so let's uh use the cd command change directory to go to the desktop okay and that's that that works because we were in the administrator directory so we can go directly to the desktop now let's do something like echo let's say hello world and we're going to put that into a file called test.txt and if we look over here probably right here you'll see that file pop up hit enter and there's that test.txt file if you open that up it should say hello world and it does so again this window is on our local computer and we are logged into it via ssh to the remote computer which we're looking at through a graphical user interface right here so that's really cool and and basically that is the essence of ssh but i want to take it a little bit further a step further and show you guys how to copy files between your remote computer and your local computer so we can do that with the scp command so let's make sure we have that installed where scp and i think at this point most windows with the with the open ssh installation most windows will come packaged with that so we do have scp installed let's do a basic copy so if we want to copy from this computer remotely to our local computer that's going to look something like this scp now from okay we're copying from the remote computer so let's provide those credentials administrator that same ip address oh i'm sorry we are on the remote computer um let's get out of here actually and go to our local computer so we'll do scp from the administrator's computer a-d-m-i-n-i-s-t-r-a-t-o-r at that ip address 161.97.70.200. and then the file that we want to copy is we'll do colon in c colon slash users slash administrator we're just giving it a full path to that file desktop and then we called it test.txt okay and i think there's probably a way if we look at the properties of this we're just giving it the full path to that property or to that file which looks like this and the name of it is test.txt okay so that's where we're copying from and then we want to copy it to our desktop so we can do to our desktop like that so similar as from before we should see a file pop up here called test dot text so we'll execute that uh we need the password for the administrator let me copy that again right click on the bar up here edit paste hit enter and there you go now that same exact file a copy of it exists on our local computer and that's what it looks like hello world now we can copy it actually yeah let's open that back up let's change this up a little bit let's say like comment subscribe something like that we'll save this as um hello hello.text on our desktop as well so there's a new file oops where'd it go did it come on my second screen oh it's right there okay so let's copy that file from our local computer to the remote computer so it'll be similar but a little bit different so we'll do scp from okay the first argument is from from our desktop slash hello let's see let's uh let's navigate into our desktop first cd desktop okay so we'll do scp from hello dot text to administrator at that remote ip address which again is 161.97.70.200 and then we can give it the full path to where we want that to end up so colon c slash users slash administrator slash desktop and we can name it the same we could we could leave it right here or we can call it something else we can call it hello.txt or we can say hello hello copy dot text so let's see if that works hit enter will ask for the administrator's password let me copy that right click edit paste hit enter and there we go we see the copy of hello on a remote computer like comment subscribe guys if you like this type of video definitely do try to like comment and subscribe i'll see you around [Music]
Info
Channel: Tony Teaches Tech
Views: 59,863
Rating: undefined out of 5
Keywords: access windows server via ssh, can you ssh into a windows machine, install openssh windows, openssh server windows, openssh server windows 10, openssh windows, openssh windows 10, ssh into windows, ssh into windows from mac, ssh into windows server, ssh windows, windows 10 ssh server, windows ssh server
Id: pFTC4Rt-EDQ
Channel Id: undefined
Length: 9min 23sec (563 seconds)
Published: Tue Feb 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.