Putty how to connect to ssh

Putty how to connect to ssh

Search Results

No Results

Filters

Connecting to a Remote Server Over SSH using PuTTY

A secure shell (SSH) is used for secure communication between devices. When most people refer to SSH, it is within the context of a connecting from a local computer to a remote server, commonly for administration tasks related to website hosting.

This article covers the basics of connecting to a remote server (such as a Linode) over SSH using the PuTTY application. PuTTY is a free and open source SSH client that provides a graphic interface for connecting to remote servers. It is compatible with Windows XP and later systems, including Windows Vista, 7, 8 and 10. It is also compatible with most UNIX systems.

Before You Begin

Ensure you have a Linux server with an SSH server (like OpenSSH) installed. Most Linux distributions have an SSH server preinstalled. If you wish to deploy a new server, follow the Creating a Compute Instance guide to create a Linode.

Install PuTTY on your local Windows or Linux system.

Connecting to the Remote Server Over SSH

Open PuTTY. You can find PuTTY on your desktop, through the Start Menu, or by using Windows Search.

Enter the following basic details about the destination host and the connection type.

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Optionally, save your session to quickly reconnect in the future. Type in a unique name for the connection under Saved Sessions and press the Save button.

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Click the Open button at the bottom of the PuTTY window to open the connection.

When you connect to a server for the first time, PuTTY prompts you to verify that the host key’s fingerprint matches what you expect.

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

If you trust this connection, press the Accept button to continue connecting to the remote server. You can verify the fingerprint by following the instructions under the Verifying the Authenticity of a Remote Server guide.

If you recently rebuilt your server, you might receive an error message when you try to connect. This happens when remote host key changes. To fix this, you must remove the IP addresses manually from the following registry entry:

PuTTY now prompts you to enter the remote user and the password for that user.

Going Further

Troubleshooting SSH Connection Issues

If SSH isn’t connecting you to your Linode, you may need to investigate the state of your server. See the guide Troubleshooting SSH for assistance.

Increasing Security

Now that you can connect from your Linux machine to the Linode over SSH, save not only time but also make the connection even more secure by using SSH public key authentication. For more information, see SSH add keys.

See the “Harden SSH Access” section of Setting Up and Securing a Compute Instance guide to review how to secure SSH on the server’s side, and the Advanced SSH Server Security for more information on making it even more secure.

Additional PuTTY Guides

This page was originally published on Friday, June 25, 2021.

How to Connect to SSH with PuTTY

When connecting to your Linux-based VPS from a Windows system, the most common way of doing that is via SSH, using PuTTY. PuTTY is a free utility which will allow command-line access to your server.

BitLaunch

Read more posts by this author.

BitLaunch

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Feel free to sign up to BitLaunch for use in this PuTTy VPS tutorial.

When connecting to your Linux-based VPS from a Windows system, the most common way of doing that is via SSH, using PuTTY. PuTTY is a free utility which will allow command-line access to your server.

PuTTY installation

To get PuTTY working requires a small amount of configuration. First, if you have not done so already, you will want to download PuTTY.

You’ll need too choose the appropriate *.msi installation file for your system while doing so. If you are unsure of whether you are running a 32-bit or 64-bit system, you can check by right-clicking on the Windows Start menu and choosing “System”. You will be provided all the necessary information. If you are still unsure, you can always choose the 32-bit version; it should run without trouble on either system.

Once you have downloaded the appropriate file, double-click on the installation icon, and run the Windows installer. After it has finished being installed, start up PuTTY.

Connect to a VPS with PuTTy via Password

After opening PuTTY, you should see a screen that looks something like this:

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

In the field labeled Host Name (or IP address), enter the IP address or hostname of your PuTTy compatible VPS, like so:

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Verify that PuTTy SSH has been chosen. You’ll also want to verify your SSH settings, so on the left menu, under “Connection,” click on “SSH” and you will see this screen:

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Under “Preferred SSH protocol version” make sure you check “2” (“1” is an older and less secure version of SSH).

At this point, you can open your SSH window, by clicking “Open.”

You will be shown a terminal window. Enter your login name, and password.

It is important to note that you will not be able to paste in your password; you must type it manually. Also, unlike in Windows systems, you will not see evidence of your typing, the screen will remain blank as you enter it. Passwords in Linux are case sensitive so you must type it exactly.

Once you have successfully logged in, you should get a screen that looks something like this:

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Connecting to a VPS with PuTTy Using an SSH Key

If you need to connect to your VPS using an SSH key pair, you will need to follow the following steps:

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Storing a Public Key

If you need to configure your system to be able to take an SSH key, you will want to place a copy of your public key into the

/.ssh/authorized_keys file on the server.

First log into your SSH account using the password method, and then navigate to

You can do this by typing:

You can verify that the authorized_keys file exists by typing ls

To edit the file, type the following command to open it up in the vi editor:

Copy the public key, either from where you have saved it or from PuTTYgen, and paste it into vi, like so:

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Save and quit the file by typing :wq and then hit the return key

Configuring the Private Key

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Click on “Browse” and navigate to find your stored *.ppk key file, and click “Open.”

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Go back to the Settings screen, enter your IP address, create a name under “Saved Sessions” and then click “Save”

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Now when you connect to the VPS with PuTTy, you will automatically be logged in as root, and PuTTY will prompt you for the passphrase that you created when creating your private key (of if you used no passphrase when creating your key, you will be automatically connected).

Summary

You now have successfully logged into your SSH account using PuTTY, and set it up to successfully connect via a secure SSH key pair. For future logins, you will only need to double-click on the saved session you created, enter your passphrase, and you are now securely connected.

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

How to Exit Nano

Over the years, Nano has grown to enjoy a devout following. While incredibly powerful, the Nano editor is almost intuitive for the novice and a fantastic addition to any coder or sysadmins’ arsenal.

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Managing Multiple VPS Servers

One of the pain points in server management area is that there are not a great deal of free management tools for multiple server installations. We will explore Cockpit project, a multi-server management tool sponsored by Red Hat which includes several advanced features.

Глава 2: Getting started with PuTTY

This chapter gives a quick guide to the simplest types of interactive login session using PuTTY.

2.1 Starting a session

When you start PuTTY, you will see a dialog box. This dialog box allows you to control everything PuTTY can do. See chapter 4 for details of all the things you can control.

You don’t usually need to change most of the configuration options. To start the simplest kind of session, all you need to do is to enter a few basic parameters.

In the «Host Name» box, enter the Internet host name of the server you want to connect to. You should have been told this by the provider of your login account.

Now select a login protocol to use, from the «Connection type» buttons. For a login session, you should select Telnet, Rlogin or SSH. See section 1.2 for a description of the differences between the three protocols, and advice on which one to use. The fourth protocol, Raw, is not used for interactive login sessions; you would usually use this for debugging other Internet services (see section 3.6). The fifth option, Serial, is used for connecting to a local serial line, and works somewhat differently: see section 3.7 for more information on this.

When you change the selected protocol, the number in the «Port» box will change. This is normal: it happens because the various login services are usually provided on different network ports by the server machine. Most servers will use the standard port numbers, so you will not need to change the port setting. If your server provides login services on a non-standard port, your system administrator should have told you which one. (For example, many MUDs run Telnet service on a port other than 23.)

Once you have filled in the «Host Name», «Protocol», and possibly «Port» settings, you are ready to connect. Press the «Open» button at the bottom of the dialog box, and PuTTY will begin trying to connect you to the server.

2.2 Verifying the host key (SSH only)

If you are not using the SSH protocol, you can skip this section.

If you are using SSH to connect to a server for the first time, you will probably see a message looking something like this:

This is a feature of the SSH protocol. It is designed to protect you against a network attack known as spoofing: secretly redirecting your connection to a different computer, so that you send your password to the wrong machine. Using this technique, an attacker would be able to learn the password that guards your login account, and could then log in as if they were you and use the account for their own purposes.

To prevent this attack, each server has a unique identifying code, called a host key. These keys are created in a way that prevents one server from forging another server’s key. So if you connect to a server and it sends you a different host key from the one you were expecting, PuTTY can warn you that the server may have been switched and that a spoofing attack might be in progress.

PuTTY records the host key for each server you connect to, in the Windows Registry. Every time you connect to a server, it checks that the host key presented by the server is the same host key as it was the last time you connected. If it is not, you will see a warning, and you will have the chance to abandon your connection before you type any private information (such as a password) into it.

However, when you connect to a server you have not connected to before, PuTTY has no way of telling whether the host key is the right one or not. So it gives the warning shown above, and asks you whether you want to trust this host key or not.

Whether or not to trust the host key is your choice. If you are connecting within a company network, you might feel that all the network users are on the same side and spoofing attacks are unlikely, so you might choose to trust the key without checking it. If you are connecting across a hostile network (such as the Internet), you should check with your system administrator, perhaps by telephone or in person. (Many servers have more than one host key. If the system administrator sends you more than one fingerprint, you should make sure the one PuTTY shows you is on the list, but it doesn’t matter which one it is.)

See section 4.21 for advanced options for managing host keys.

2.3 Logging in

After you have connected, and perhaps verified the server’s host key, you will be asked to log in, probably using a username and a password. Your system administrator should have provided you with these. (If, instead, your system administrator has asked you to provide, or provided you with, a «public key» or «key file», see chapter 8.)

PuTTY will display a text window (the «terminal window» – it will have a black background unless you’ve changed the defaults), and prompt you to type your username and password into that window. (These prompts will include the PuTTY icon, to distinguish them from any text sent by the server in the same window.)

Enter the username and the password, and the server should grant you access and begin your session. If you have mistyped your password, most servers will give you several chances to get it right.

While you are typing your password, you will not usually see the cursor moving in the window, but PuTTY is registering what you type, and will send it when you press Return. (It works this way to avoid revealing the length of your password to anyone watching your screen.)

If you are using SSH, be careful not to type your username wrongly, because you will not have a chance to correct it after you press Return; many SSH servers do not permit you to make two login attempts using different usernames. If you type your username wrongly, you must close PuTTY and start again.

If your password is refused but you are sure you have typed it correctly, check that Caps Lock is not enabled. Many login servers, particularly Unix computers, treat upper case and lower case as different when checking your password; so if Caps Lock is on, your password will probably be refused.

2.4 After logging in

After you log in to the server, what happens next is up to the server! Most servers will print some sort of login message and then present a prompt, at which you can type commands which the server will carry out. Some servers will offer you on-line help; others might not. If you are in doubt about what to do next, consult your system administrator.

2.5 Logging out

Use SSH Keys with PuTTY on Windows

Table of Contents

Introduction

SSH can handle authentication using a traditional username and password combination or by using a public and private key pair. The SSH key pair establishes trust between the client and server, thereby removing the need for a password during authentication. While not required, the SSH private key can be encrypted with a passphrase for added security.

The PuTTY SSH client for Microsoft Windows does not share the same key format as the OpenSSH client. Therefore, it is necessary to create a new SSH public and private key using the PuTTYgen tool or convert an existing OpenSSH private key.

Requirements

Install PuTTY and PuTTYgen

Both PuTTY and PuTTYgen are required to convert OpenSSH keys and to connect to the server over SSH. These two tools can be downloaded individually or, preferably, as a Windows installer from the PuTTY Download Page.

Once the PuTTY Windows installer is downloaded, double-click the executable in the Download folder and follow the installation wizard. The default settings are suitable for most installations. Both PuTTY and PuTTYgen should now be accessible from the Windows Programs list.

Use Existing Public and Private Keys

If you have an existing OpenSSH public and private key, copy the id_rsa key to your Windows desktop. This can be done by copying and pasting the contents of the file or using an SCP client such as PSCP which is supplied with the PuTTY install or FileZilla.

Next launch PuTTYgen from the Windows Programs list.

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

If the public key is already appended to the authorized_keys file on the remote SSH server, then proceed to Connect to Server with Private Key.

Create New Public and Private Keys

Launch PuTTYgen from the Windows Programs list and proceed with the following steps.

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Copy Public Key to Server

Use your preferred text editor to create and/or open the authorized_keys file:

Paste the public key into the authorized_keys file.

Save the file and close the text editor.

Adjust the permissions of the authorized_keys file so that the file does not allow group writable permissions.

Logout of the remote server.

Connect to Server with Private Key

Now it is time to test SSH key authentication. The PuTTYgen tool can be closed and PuTTY launched again.

How to Connect to your Server with SSH

2 Minutes, 57 Seconds to Read

In this tutorial, we’re going to be using PuTTY to connect to your managed VPS, Cloud or dedicated server via SSH. For Windows users without an SSH client, we recommend you download PuTTY or enable OpenSSH.

Requirements for using SSH to login to your VPS or Dedicated Server

There are a few requirements for using SSH with your VPS or Dedicated Server. These include making sure that your account has been granted SSH access and that your IP address has been added to the firewall. Both of these requirements can be fulfilled through the WHM interface. The following articles will help you meet these prerequisites:

Terminal on Linux/macOS/BSD

This applies to Windows users with OpenSSH: Open the Start menu,select Powershell, and then Run as Administrator.

If you are trying to directly connect from a Linux or Mac terminal via SSH, please note the format of the command would need to be in this format:18If you are trying to directly connect from a Linux or Mac terminal via SSH, please note the format of the command would need to be in this format:

If you do not specify the full username such as [email protected], the server would instead try to login as your local user, in this case [email protected], and because that user doesn’t exist on the server you’d get a login error.

Settings for using PuTTY

PuTTY is a free, open-source terminal emulator written by Simon Tatham that gives you access to SSH. It supports several different network protocols. Before we open PuTTY, you’ll need the following settings:

Your hostname and username can be found in the Technical Details of your AMP home page.

Host Name:As your hostname, you can use either your server’s ip address, your domain, or your server name (as in vps####.inmotionhosting.com or biz152.inmotionhosting.com)
Username:Use your cPanel username.
Password:Use your cPanel password.

How to connect using PuTTY

In this tutorial, I am using vps801.inmotionhosting.com as the host name, “brad” as the cPanel username, and the ******** as the password.

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Can’t connect? Getting an error message Network Error: Connection timed out? Be sure to add your ip address to the firewall.

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Putty how to connect to ssh. Смотреть фото Putty how to connect to ssh. Смотреть картинку Putty how to connect to ssh. Картинка про Putty how to connect to ssh. Фото Putty how to connect to ssh

Note! If you get an error stating Shell Access is Not Enabled on your server, you will need to contact tech support to have our higher level of support enable the shell access. If you can access your WHM, you can enable SSH through your WHM.

Congratulations, you have now successfully logged into your server via SSH!

Are you trying to get started with Ansible? Make sure you generate an SSH key before getting started with your Ansible Management Container.

30 Comments

I was finally able to SSH Access through PuTTY with the instructions left in this article but I don’t have root access in my session. Is there something that I missed?

Hi, Ray! There are a few extra steps to getting root access, but if you’ve already been able to connect to the server you won’t have much more to do. Please refer to our guide on Root Access for details on how to get the root access password, and remember to SSH in as ‘root’ with it. Hope that helps!

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *