Windowsclient SSH Remote Connection windowsserver (PowerShell Server)

Source: Internet
Author: User
Tags using git

Recently just finished the SSH framework. Research and study SSH remote connection. Why do you want to do this? Because now I'm developing my own laptop (Windows), and then writing the backend to be deployed to the lab's desktop (Windows), so I have to go to the lab when I pity dorado things. Work on the desktop pull the project down and then deploy it to Tomcat (but a course project). Don't laughed at Ha ~). So why can't I remotely manipulate my desktop?

Good. So I started to find the internet, and found SSH remote connection, but most of the tutorials are Linux. There are very few basic windows that can be tested. After all, Linux tends to be more share and Windows is basically personal. But I don't want to install my desktop as Linux, after all, it has a lot of software installed, and our Oracle database is still on this computer. thus Try to find out if there is any way to find some, but also really found a blog (http://www.cnblogs.com/xred/archive/2012/04/21/2461627.html) that is the story. This blogger's service is freesshd this software, the client is our frequent use of the putty.

This is really able to connect remotely, but the content of putty feedback is a bunch of garbled. And there is no scroll bar, Chinese is not to mention, can say. Even though I can connect, I can't use = =

In fact, I'm going to Google to find out how to solve this freesshd garbled problem. Inadvertently found an answer to say such as the following sentence:


This arouses my curiosity, what is this PowerShell Server? It's just that you used this poweshell. This is the advanced version of CMD that is capable of kill threads ~ so it is to find this PowerShell (http://www.powershellserver.com/), read a brief introduction. This is a remote connection software that is dedicated to connecting windows. And it's another free version. Although I can only agree to connect a person at the same time, I think it is enough for me.

The use of this is also very convenient. Detailed configuration use can refer to this getstart (http://www.powershellserver.com/support/articles/getting-started/)

OK, let's download one:

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">

Configuration, because I just need to connect remotely. So the rest of us, whatever it is.

Click on the server Key first

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">

Since I'm under the same router we have another deployment of Gitlab CentOS. So this public network under Port 22nd is occupied, so, I have to change my this sshserver port:

And then, to set up under the firewall open 33rd port Oh!


In fact, originally this software is brought with a server key, this can be found in our file folder ~

We can also generate a key ourselves, that is, click on the Generate and then follow the prompts to build the ~

And then what. Let's click Security.

The configuration here is as good as mine-the last file Based public key is the one generated by your client (the one I used directly from Git)

Then, we change his coding style, change to Chinese simplified, so that our putty inside the display of Chinese ~

At this point, click Save to start.

Then our server is configured ~

Let's configure the client. We'll just use putty here.

Go to the official website (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) to download a putty.zip


Then we go to the installation folder:

To open the Puttygen.exe software, click Load to load a private key, because my private key is not generated by Puttygen (also originally built using git, this is to be consistent with the server public key), So a conversion is required. After loading, click Save Private Key, Save as PRI.PPK, this is Pageant.exe acknowledged key.

Then open Pageant.exe, you will see an icon below the tray, click on the Add key to load the PRI.PPK file just generated.

Then we open Putty.exe.

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">


For the convenience of future visits, we are able to store a configuration here and then open

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">

Because. The client's private key is consistent with the server's public key. So we just log in directly, this login is able to write casually. We are logged in as a happy user (my Windows user) of the server. Assuming we checked the run as Windwos service at the very beginning, we're not logged in to my Windows Local users.


Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">




Everybody see this path has changed, why I want to use Windows user login, because for my initial needs. In order to be able to pull down from GitHub the latest server version number, assuming that the server's native user is not logged in, then there is no corresponding GitHub private key (I connect with GitHub is also SSH), then will be reported an error:git Host Key verification failed

So, I didn't tick that option ~

Well, that's probably the way ~ I hope you have fun!

===================================================

This morning, suddenly found the connection. Actually to enter the password, enter the correct password after the connection failed. Then look at the output information of the server. That the private key does not match the public key.

It turns out that the method we used to set the SSH private key is not permanent. So, we can open that PAGEANT.EXE and then follow the above operation to add the private key, but, every time the laptop boot after the connection to this kind of words, is not too inconvenient?

So, we can set up Putty.exe this program:


Then save our connection session (I'm happiness here). After the next practice, then import this session will be good ~


Yes, well, that's all you have to add.



Windowsclient SSH Remote Connection windowsserver (PowerShell Server)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.