HomeTechnologyNewsHow to connect to an SSH server from Windows, macOS or Linux

How to connect to an SSH server from Windows, macOS or Linux

- Advertisement -
- Advertisement -
- Advertisement -
- Advertisement -


Hannah Stryker / Instructional Geek

To connect to an SSH server on Windows, install the optional SSH feature and then run “ssh [email protected]” in PowerShell or Windows Terminal. On Linux or macOS, open Terminal and run “ssh [email protected]”.

An SSH client allows you to connect to a remote computer running an SSH server. The Secure Shell (SSH) protocol is often used for remote terminal connections, allowing you to access a text-mode terminal on a remote computer as if you were sitting at it. It can also be used for SSH tunneling, SCP file transfers, and whatnot.

How to SSH into a computer on Windows

Windows 10 and Windows 11 now have an official SSH client that you can install. It’s part of Windows 10 and Windows 11, but it’s an “optional feature.”

To install the OpenSSH client on Windows 10 or Windows 11, open the Settings app, then go to Apps > Apps & features > Optional features. Click “Add a feature”, then scroll through the optional features until you find “OpenSSH Client”. Check the box, then click “Install.”

Once it’s installed, open PowerShell, then use the SSH command to connect to a server. For example:

The SSH command that runs in PowerShell on Windows.

If you want something with a graphical user interface (GUI) and more flexibility, try putty instead.

RELATED: 5 cool things you can do with an SSH server

Download putty and run it to get started. You can download an installer that includes putty and related utilities. or a putty.exe file that can function as a portable application.

Type the hostname or IP address of the SSH server in the “Hostname (or IP address)” box. Make sure the port number in the “Port” box matches the port number that the SSH server requires. SSH servers use port 22 by default, but servers are often configured to use other port numbers instead. Click “Open” to connect.

putty is a full-featured SSH program that enables SSH on Windows.  It can be extensively customized.

You will see a security alert the first time you try to connect to a server. This tells you that you have not previously connected to this server. That’s to be expected, so click “OK” to continue.

If you see this warning in the future after you’ve connected to the server once, it indicates that the server’s encryption key fingerprint is different. Either the server administrator has changed it, or someone is intercepting your traffic and trying to trick you into connecting to a rogue, imposter SSH server. Be careful!

You will be prompted to enter the username and password for your account on the SSH server. After doing so, you will be connected. Just close the window to end the SSH connection.

putty connected to user "geeky" on the localhost server.

There’s so much more you can do with putty. For example, if you need to use a private key file to authenticate with the SSH server, you’ll find this option under Connection > SSH > Authentication in the PuTTY Settings window that appears when you start the application. See the putty manual for more information. Here’s a fun fact: SSH private keys are technically called PEM files.

RELATED: How to manage an SSH configuration file on Windows and Linux

How to use SSH on macOS or Linux

UNIX-based operating systems such as macOS and Linux include a built-in SSH command that works pretty much the same everywhere.

RELATED: How to install and use the Linux Bash Shell on Windows 10

To connect to an SSH server from one of these operating systems, first open a Terminal window. On a Mac, you’ll find this in Finder > Applications > Utilities > Terminal. On a Linux desktop, look for a Terminal shortcut in the applications menu.


Apps on macOS Ventura. ” width=”730″ height=”457″ onload=”pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);” onerror=”this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);”>

To connect to an SSH server, type the following command in the terminal, replacing username with your username on the SSH server and ssh.server.com with the hostname or IP address of the SSH server:

ssh [email protected]

This command will connect to the SSH server on port 22, which is the default. To specify a different port, add -p to the end of the command followed by the port number you want to connect to, like so:

ssh [email protected] -p 2222

An example of an SSH command executed on macOS.

You will see a message asking you to confirm the identity of the server the first time you connect. If this is really the first time you have connected to the server, the message is normal and you can type “yes” to continue.

The first warning about connecting to an SSH server.

If you have connected to the server before and see this message, this indicates that the server administrator has changed the key fingerprint or you are being tricked into connecting to an imposter server. Be careful!

RELATED: The best ways to protect your SSH server

You will be prompted to enter the password required by the user account on the SSH server before continuing. Once you’ve done that, you’ll be connected. Close the window or type “exit” and press Enter to end the SSH connection.

The warning you'll see if a server's id has changed since you last connected.  Proceed with caution unless you know why the change has occurred.

You can find more information about using the ssh command in the SSH man page. You can access by typing man ssh in the terminal, or viewing it in your web browser. If you are running your own SSH server, be sure to lock it down to improve your security.

RELATED: 5 cool things you can do with an SSH server


- Advertisement -
- Advertisement -
Stay Connected
[td_block_social_counter facebook="#" manual_count_facebook="16985" manual_count_twitter="2458" twitter="#" youtube="#" manual_count_youtube="61453" style="style3 td-social-colored" f_counters_font_family="450" f_network_font_family="450" f_network_font_weight="700" f_btn_font_family="450" f_btn_font_weight="700" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjMwIiwiZGlzcGxheSI6IiJ9fQ=="]
Must Read
- Advertisement -
Related News
- Advertisement -