Wednesday, November 22, 2017

The Best Terminal Emulator for Windows

Windows' built-in command line programs aren't that great on their own. To make them better, we like to use third-party terminal programs, our favorite being the customizable and free Console.

Console2

Platform: Windows
Price: Free
Download Page

Features

  • Provides a fully-functional command line interface (CLI) that can run any existing shell on Windows—like PowerShell, Cygwin, or even PuTTY
  • Open multiple tabs using any shell you want
  • Text editor-like text selection
  • Multiple window styles
  • Configurable fonts, colors and transparency
  • Lots of customizable hotkeys for opening new tabs, switching between tabs, and scrolling

Where It Excels

Console is simple and easy to use while at the same time being much more configurable than any single-shelled program, while holding the ability to run any of those shells in a new tab—whether it be the UNIX-like Cygwin, Windows' very useful PowerShell, SSH king PuTTY, or the standard Windows Command Prompt. You can configure what the window looks like, open multiple tabs, and even run a number of different shells at once in the same window. It also has quite a few options for tweaking the behavior of the app, like how it selects text, which hotkeys and mouse buttons do what, and so on. If you ever do any work in a terminal on Windows, this program will make your life a little bit easier.

Where It Falls Short

If you're a very heavy or very advanced terminal user, you may want something even more powerful than Console. Console isn't the most feature-filled terminal on the block, but that's a good thing—most other terminal programs are way more powerful, cluttered, and expensive than most users need. So, if you're looking for something with built-in search or line numbers, you may want to check out the competition section below.

The Competition

The competition for apps like this is pretty thin on Windows. If you don't like Console, you'll probably want to check out PowerCmd as your next option. It's a bit pricier at $30, but it contains a few extra features like the ability to search your consoles, view multiple sessions in one big window, line numbering, and add bookmarks on certain lines. It's definitely not an app that most terminal users will need, and it's a bit slower than something like Console, but advanced users will probably prefer it.
If you're a really advanced user that requires a powerful terminal every day, you might want to try out Take Command. It's very expensive ($99), but also insanely powerful, adding more than 140 new commands and 460 internal functions and variables to the standard Windows command prompt (not to mention a built-in file manager and debugger). It's definitely geared more toward developers than end users, but it's worth a mention for its sheer power alone.
Lastly, if the only shells you use are Cygwin or MSYS/MinGW, you might prefer Mintty over Console. Cygwin's default program isn't very great, and Mintty gives you a few extra options over Console, but doesn't let you run other shells (like the Command Prompt or PowerShell), so it isn't quite as useful. Mintty is also free.
Do you have a favorite terminal program we didn't mention? Be sure to let us know about it in the comments.

What are the best terminal emulators for Windows?

10 best SSH Clients for Windows: free alternatives to PuTTY

10 best SSH Clients for Windows: free alternatives to PuTTY

I thought I was pretty happy with PuTTY as my Windows SSH client but these 10 best SSH clients made me rethink. And I am no longer using PuTTY for SSH on Windows 10 machine. Linux based systems are becoming more and more common. As examples, DD-WRT router administration, ASUS router hacks, and Raspberry Pi management, all require SSH work. SSH or Secure Shell, in simple terms, provides commandline access to a remote system running SSH server. For any admin level hacks you will be required to SSH into your remote system. For several years I used PuTTY, but early this year I switched to MobaXterm Home Edition, a free SSH client for Windows, and I am more than happy. I have shown you how to install SSH on Ubuntu Server. In this post, I will cover some of the best SSH clients for Windows and some free alternatives to PuTTY.

Best SSH Clients for Windows

A big missing piece in Windows is the lack of a Linux compatible shell. There are several top SSH clients that fill this void. To cut to the chase: PuTTY is the most common free SSH client for Windows. My personal favorite is MobaXterm, which is free for personal use with up to 10 hosts. Read on to find out more about other free Windows SSH client options.

1. PuTTY (free; open-source)

Before we talk about PuTTY alternatives, let me first talk about PuTTY, which offers a great free SSH / Telnet shell for Windows. Some would probably say PuTTY is the best SSH client. I have shown you how to install PuTTY on Windows. Connecting to a remote SSH server is as simple as just typing in the IP address or domain and port and hitting open.
SSH Access with PuTTY for Windows
SSH Access with PuTTY for Windows
You may be asked for username and password to connect to the remote SSH server. Alternatively, you can use PuTTY with SSH keys to connect without passwords. You can even create Windows shortcut to PuTTY sessions to open an SSH session with one click. Now that we have seen what is PuTTY let us look at some best SSH clients that can be great PuTTY alternatives.

PuTTY Like Programs for Windows

The 3 SSH clients listed bellow are based on PuTTY and they look like PuTTY but provide added features to take PuTTY to next level. If you want to stick with PuTTY environment, then one of these SSH clients for Windows is worth a look.

2. SuperPutty (free; open-source; based on PuTTY)

SuperPutty is a Windows PuTTY alternative that aims to make a better version of PuTTY. However, it requires PuTTY to run. In other words, SuperPuTTY makes existing PuTTY install better. It allows tabbed sessions as well as SCP file transfers between remote and local system.
SuperPuTTY Windows SSH Client
SuperPuTTY requires PuTTY to run
SuperPuTTY’s features include:
  • Docking user interface allows personalized workspace and managing multiple PuTTY sessions easy
  • Export/Import session configuration
  • Upload files securely using the scp or sftp protocols
  • Layouts allow for customizing session views
  • Supports PuTTY session configurations including Private Keys
  • Supports SSH, RLogin, Telnet and RAW protocols
  • Supports local shell via MinTTY or puttycyg
  • Supports KiTTY

Recommended Reading:

3. PuTTY Tray (free; open-source; based on PuTTY)

PuTTY Tray, as the name suggests, is based on PuTTY. It adds cosmetic changes and extends PuTTY further using addons that make it better than PuTTY. But in many ways it looks very much like PuTTY. Some of its features include:
  • Minimizing to the system tray (on CTRL + minimize, always or directly on startup)
  • Icons are customisable
  • Blinks tray icon when a bell signal is received
  • Configurable window transparency
  • URL hyperlinking
  • Portability: optionally stores session configuration in files (for example: on a USB drive) like portaPuTTY
  • Easy access to the ‘always on top’ setting (in the system menu)
  • Android adb support
If you are big PuTTY fan, then PuTTY Tray is a great alterantive to PuTTY SSH. [Read: Connecting to Ubuntu Server using SSH Keys and Putty]

4. KiTTY (free; open-source; based on PuTTY)

KiTTY is a fork of PuTTY designed to function as a Windows SSH Client. KiTTY has all features from PuTTY and adds many more features.
KiTTY SSH Software for Windows
KiTTY looks very similar to PuTTY
While the entire list of features can be found on KiTTY’s website, some key added features are listed below:
  • Sessions filter
  • Portability
  • Shortcuts for pre-defined command
  • Automatic password
  • Running a locally saved script on a remote session
  • An icon for each session
  • Send to tray
  • Quick start of a duplicate session
  • pscp.exe and WinSCP integration
KiTTY is another great alternative to PuTTY.

Alternatives to PuTTY

PuTTY is great and is one the most common free Windows SSH clients. That said, PuTTY looks pretty pedestrian and one of the biggest missing features is the inability to open sessions in tabs. Some of the PuTTY alternatives listed below not only allow tabs but also combine other protocols such as FTP, SFTP, and more into one single tool, which can be handy for a home server user or server administrator. So let us have a brief look at some best Windows SSH client options.

5. MobaXterm (free; paid Pro version available)

MobaXterm is a single Windows application that provides a ton of functions for programmers, webmasters, IT administrators, and anybody is looking to manage system remotely.
Best SSH Clients Windows - MobaXterm
MobaXterm Home – The Best Windows SSH Client
Some of its features include:
  • Support for several protocols (SSH, X11, RDP, VNC, FTP, MOSH, …)
  • Brings Unix commands to Windows (bash, ls, cat, sed, grep, awk, rsync, …)
  • Embedded X Server and X11-Forwarding
  • Tabbed terminal for SSH
  • GUI File / Text editor
  • Portable and light
It can be extended further with plugins. The thing I like about MobaXterm is that no intrusive ads / prompts to upgrade are displayed even on the free Home edition. The paid Professional version brings more features. [Read: How to SSH into Raspberry Pi for remote administration?]

6. SmarTTY (free)

SmarTTY is also one of the best SSH clients for Windows. It is my second favorite after MobaXterm and a solid PuTTY replacement. And best of all, it is free to use.
SmarTTY - Free Windows SSH Client
SmarTTY – Free Windows SSH Client
SmarTTY combines several awesome features into one application:
  • One SSH session – multiple tabs
  • Transfer files and whole directories
  • Edit files in-place
  • Built-in hex terminal for COM ports
  • Out-of-the-box public-key auth
  • Run graphical applications seamlessly with built-in Xming
SmartTTY is regularly updated and stands out among programs like PuTTY.

7. Dameware SSH client (free; paid options available)

Dameware SSH client is a free Windows SSH terminal emulator that allows multiple telnet and SSH connects from one easy-to-use console.
Dameware SSH Client for Windows
Dameware SSH Client for Windows
Dameware SSH client’s features include:
  • Manage multiple sessions from one console with a tabbed interface
  • Save favorite sessions within the Windows file system
  • Access multiple sets of saved credentials for easy log-in to different devices
  • Connect to computers and devices using telnet, SSH1, and SSH2 protocols
Dameware SSH client does not stand out from some of the other best SSH clients but it is comparable to them. On the free version it does show an ad prompting you to upgrade to their paid service. If you like the interface then definitely do give it a try.

8. mRemoteNG (free; open-source)

mRemoteNG, a fork of mRemote, is an open source, tabbed remote connections manager that combines multiple protocols into one application. Like some of the other best Windows SSH clients listed above, it also allows tabbed interface.
mRemoteNG - Alternative to PuTTY
mRemoteNG SSH Shell for Windows
mRemoteNG supports the following protocols:
  • RDP (Remote Desktop/Terminal Server)
  • VNC (Virtual Network Computing)
  • ICA (Citrix Independent Computing Architecture)
  • SSH (Secure Shell)
  • Telnet (TELecommunication NETwork)
  • HTTP/HTTPS (Hypertext Transfer Protocol)
  • rlogin
  • Raw Socket Connections
It is completely free to use and worth a try, especially if you prefer open-source applications.

Recommended Reading:

9. Terminals (free; open-source)

Terminals is a secure, multi tab terminal services/remote desktop client. It is offers several features and competes with some of the paid or closed source SSH Windows clients listed above.
Terminals - Alternative to PuTTY
Terminals SSH Client
  • Multi tab interface
  • Open terminal in full screen, switch between full screen mode
  • Favorites
  • Networking tools: Ping, Tracert, DNS tools, Wake on lan, Port scanner, Shares, etc.
  • Connections history
  • Screenshot capture
  • Open custom application from Terminals window
  • Multi-protocol: Windows remote desktop (RDP), VNC, VMRC, SSH, Telnet, and more
Terminals definitely has a lot of tools and features compared to some of the other SSH client software listed above. The full list of features and screenshots are available on Terminal’s website.

10. FireSSH Addon

If for whatever reason you prefer not to use a separate software for SSH remote administration, then FireSSH addon for Firefox and Chrome can be a great alternative. A great example is when you are on a system that you do not have administrative privileges. While portable SSH clients could work on such Windows PCs, FireSSH extension is platform independent.
FireSSH for Firefox and Chrome
FireSSH for Firefox and Chrome
FireSSH is an extension written in Javascript and allows you to connect to remote SSH server through your browser. If your browser allows tabbed browsing then you can open SSH sessions in separate tabs.

Concluding Remarks

The above list of best SSH software for Windows is not by any means exhaustive. There are other good SSH clients such as XShell (paid), Bitvise SSH Client (free for individual use), and TeraTerm (Free) that may be comparable. Also, please remember that the above list is focussed towards home server or media center users for basic administrative tasks and not business environments. Some of the Android media players can even be administered using SSH with an SSH server app installed. As mentioned in the article, I have used and like PuTTY but I have moved on to MobaXterm and have been very happy. For many, this will be a matter of personal preference. But I hope that this list of best SSH clients summarizes a few options to choose from.

SSH Client for Windows - Comparison


SSH client is a program that allows establishing a secure and authenticated SSH connections to SSH servers.

Windows SSH Client Options

There are several other clients and servers available. These are generally not supported for SSH key management and may not have commercial support or 24x7 support available.
Tectia SSH is a commercially supported SSH client for enterprises, with 24x7 support. More information on Tectia SSH.
PuTTY is a free client for the SSH and telnet protocols. More information on PuTTY.
WinSCP is a free open source Windows client for file transfers. In addition to file transfer (with FTP, SFTP, or SCP protocols) WinSCP offers a basic file manager functionality and supports scripting. More information
FileZilla is a free file transfer client. More information on FileZilla.
Chrome SSH extension - The Google Chrome browser can be turned into an SSH client with an extension available in the Chrome Web Store. The Chrome SSH (beta) offers a basic SSH protocol capability.
SSH client extension to the Chrome-browser
Bitvise is a European software company that priovides an SSH client also for Windows. A copy of Bitvise SSH Client can be downloaded from: https://www.bitvise.com/ssh-client-download.
VanDyke Software offers their commercial client software for a free, time-limited evaluation. VanDyke SecureCRT and SecureFX clients supports telnet, Secure Shell (SSH), and SFTP. An evaluation copy can be downloaded from https://vandyke.com/download/index.html.

Monday, October 2, 2017

Manually generating your SSH key in Windows

You can use PuTTY to generate your SmartMachine SSH key. PuTTY is a free open-source terminal emulator that functions much like the Terminal application in Mac OS X in a Windows environment. If you prefer a command line approach to SSH, you can use Cygwin to emulate a Linux-like environment on your Windows machine.
This topic shows you how to manually generate and upload an SSH key when working with PuTTY in the Windows environment.

About PuTTY

PuTTY is an SSH client for Windows that you will use to generate your SSH keys. You can download PuTTY from www.chiark.greenend.org.uk.
When you install the PuTTY client, you also install the PuTTYgen utility. PuTTYgen is what you will use to generate your SSH key for a Windows VM.
warning
This page gives you basic information about using PuTTY and PuTTYgen to log in to your provisioned machine. For more information on PuTTY, see the PuTTY documentation

Generating an SSH key

To generate an SSH key with PuTTYgen, follow these steps:
  1. Open the PuTTYgen program.
  2. For Type of key to generate, select SSH-2 RSA.
  3. Click the Generate button.
  4. Move your mouse in the area below the progress bar. When the progress bar is full, PuTTYgen generates your key pair.
  5. Type a passphrase in the Key passphrase field. Type the same passphrase in the Confirm passphrase field. You can use a key without a passphrase, but this is not recommended.
  6. Click the Save private key button to save the private key. Warning! You must save the private key. You will need it to connect to your machine.
  7. Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys file and choose Select All.
  8. Right-click again in the same text field and choose Copy.
PuTTY key generator

Uploading an SSH key

Now you need to upload the copied SSH key to your Cloud Management portal.
  1. After you copy the SSH key to the clipboard, return to the Cloud Management portal.
  2. In the SSH Key field, paste your SSH key.
  3. In the Name field, provide a name for the key. Information Providing a key name is optional but is a good practice for ease of management.
  4. Click the Add this key button. See below.
uploading an ssh key
Warning! PuTTY and OpenSSH use different formats of public SSH keys. If the text you pasted in the SSH Key starts with —— BEGIN SSH2 PUBLIC KEY, it is in the wrong format. Be sure to follow the instructions carefully. Your key should start with ssh-rsa AAAA….
Once you upload your SSH key to the portal, you can connect to your virtual machine from Windows through a PuTTY session.

How To Set Up SSH Keys LINUX

About SSH Keys

SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. While a password can eventually be cracked with a brute force attack, SSH keys are nearly impossible to decipher by brute force alone. Generating a key pair provides you with two long string of characters: a public and a private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. You can increase security even more by protecting the private key with a passphrase.

Step One—Create the RSA Key Pair

The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):
ssh-keygen -t rsa

Step Two—Store the Keys and Passphrase

Once you have entered the Gen Key command, you will get a few more questions:
Enter file in which to save the key (/home/demo/.ssh/id_rsa):
You can press enter here, saving the file to the user home (in this case, my example user is called demo).
Enter passphrase (empty for no passphrase):
It's up to you whether you want to use a passphrase. Entering a passphrase does have its benefits: the security of a key, no matter how encrypted, still depends on the fact that it is not visible to anyone else. Should a passphrase-protected private key fall into an unauthorized users possession, they will be unable to log in to its associated accounts until they figure out the passphrase, buying the hacked user some extra time. The only downside, of course, to having a passphrase, is then having to type it in each time you use the Key Pair.
The entire key generation process looks like this:
ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/demo/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/demo/.ssh/id_rsa.
Your public key has been saved in /home/demo/.ssh/id_rsa.pub.
The key fingerprint is:
4a:dd:0a:c6:35:4e:3f:ed:27:38:8c:74:44:4d:93:67 demo@a
The key's randomart image is:
+--[ RSA 2048]----+
| .oo. |
| . o.E |
| + . o |
| . = = . |
| = S = . |
| o + = + |
| . o + o . |
| . o |
| |
+-----------------+
The public key is now located in /home/demo/.ssh/id_rsa.pub The private key (identification) is now located in /home/demo/.ssh/id_rsa

Step Three—Copy the Public Key

Once the key pair is generated, it's time to place the public key on the virtual server that we want to use.
You can copy the public key into the new machine's authorized_keys file with the ssh-copy-id command. Make sure to replace the example username and IP address below.
ssh-copy-id user@123.45.56.78
Alternatively, you can paste in the keys using SSH:
cat ~/.ssh/id_rsa.pub | ssh user@123.45.56.78 "mkdir -p ~/.ssh && cat >>  ~/.ssh/authorized_keys"
No matter which command you chose, you should see something like:
The authenticity of host '12.34.56.78 (12.34.56.78)' can't be established.
RSA key fingerprint is b1:2d:33:67:ce:35:4d:5f:f3:a8:cd:c0:c4:48:86:12.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '12.34.56.78' (RSA) to the list of known hosts.
user@12.34.56.78's password:
Now try logging into the machine, with "ssh 'user@12.34.56.78'", and check in:

~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.
Now you can go ahead and log into user@12.34.56.78 and you will not be prompted for a password. However, if you set a passphrase, you will be asked to enter the passphrase at that time (and whenever else you log in in the future).

Optional Step Four—Disable the Password for Root Login

Once you have copied your SSH keys unto your server and ensured that you can log in with the SSH keys alone, you can go ahead and restrict the root login to only be permitted via SSH keys.
In order to do this, open up the SSH config file:
sudo nano /etc/ssh/sshd_config
Within that file, find the line that includes PermitRootLogin and modify it to ensure that users can only connect with their SSH key:
PermitRootLogin without-password
Put the changes into effect:
reload ssh

Digital Ocean Addendum

The Digital Ocean control panel allows you to add public keys to your new droplets when they're created. You can generate the SSH Key in a convenient location, such as the computer, and then upload the public key to the SSH key section.
Then, when you create a new VPS, you can choose to include that public key on the server. No root password will be emailed to you and you can log in to your new virtual private server from your chosen client. If you created a passphrase, you will be prompted to enter that upon login.

SSH Protocol

The SSH protocol (also referred to as Secure Shell) is a method for secure remote login from one computer to another. It provides several alternative options for strong authentication, and it protects the communications security and integrity with strong encryption. It is a secure alternative to the non-protected login protocols (such as telnet, rlogin) and insecure file transfer methods (such as FTP).

Typical uses of the SSH protocol

The protocol is used in corporate networks for:
  • providing secure access for users and automated processes
  • interactive and automated file transfers
  • issuing remote commands
  • managing network infrastructure and other mission-critical system components.

How does the SSH protocol work

The protocol works in the client-server model, which means that the connection is established by the SSH client connecting to the SSH server. The SSH client drives the connection setup process and uses public key cryptography to verify the identity of the SSH server. After the setup phase the SSH protocol uses strong symmetric encryption and hashing algorithms to ensure the privacy and integrity of the data that is exchanged between the client and server.
The figure below presents a simplified setup flow of a secure shell connection.
How does the SSH protocol work?

Strong authentication with SSH keys

There are several options that can be used for user authentication. The most common ones are passwords and public key authentication.
The public key authentication method is primarily used for automation and sometimes by system administrators for single sign-on. It has turned out to be much more widely used than we ever anticipated. The idea is to have a cryptographic key pair - public key and private key - and configure the public key on a server to authorize access and grant anyone who has a copy of the private key access to the server. The keys used for authentication are called SSH keys. Public key authentication is also used with smartcards, such as the CAC and PIV cards used by US government.
The main use of key-based authentication is to enable secure automation. Automated secure shell file transfers are used to seamlessly integrate applications and also for automated systems & configuration management.
We have found that large organizations have way more SSH keys than they imagine, and managing SSH keys has become very important. SSH keys grant access as user names and passwords do. They require a similar provisioning and termination processes.
In some cases we have found several million SSH keys authorizing access into production servers in customer environments, with 90% of the keys actually being unused and representing access that was provisioned but never terminated. Ensuring proper policies, processes, and audits also for SSH usage is critical for proper identity and access management. Traditional identity management projects have overlooked as much as 90% of all credentials by ignoring SSH keys. We provide services and tools for implementing SSH key management.

SSH provides strong encryption and integrity protection

Once a connection has been established between the SSH client and server, the data that is transmitted is encrypted according to the parameters negotiated in the setup. During the negotiation the client and server agree on the symmetric encryption algorithm to be used and generate the encryption key that will be used. The traffic between the communicating parties is protected with industry standard strong encryption algorithms (such as AES (Advanced Encryption Standard)), and the SSH protocol also includes a mechanism that ensures the integrity of the transmitted data by using standard hash algoritms (such as SHA-2 (Standard Hashing Algorithm)).

IETF SSH standard and detailed technical documentation

The core protocol

When the SSH protocol became popular, Tatu Ylonen took it to the IETF for standardization. It is now an internet standard that is described in the following documents:

SFTP file transfer protocol

The SFTP (SSH File Transfer Protocol) is probably the most widely used secure file transfer protocol today. It runs over SSH, and is currently documented in draft-ietf-secsh-filexfer-02.

Public key file format

The public key file format is not a formal standard (it is an informational document), but many implementations support this format.

Secure Shell wiki

Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network.[1] The best known example application is for remote login to computer systems by users.
SSH provides a secure channel over an unsecured network in a client-server architecture, connecting an SSH client application with an SSH server.[2] Common applications include remote command-line login and remote command execution, but any network service can be secured with SSH. The protocol specification distinguishes between two major versions, referred to as SSH-1 and SSH-2.
The most visible application of the protocol is for access to shell accounts on Unix-like operating systems, but it sees some limited use on Windows as well. In 2015, Microsoft announced that they would include native support for SSH in a future release.[3]
SSH was designed as a replacement for Telnet and for unsecured remote shell protocols such as the Berkeley rlogin, rsh, and rexec protocols. Those protocols send information, notably passwords, in plaintext, rendering them susceptible to interception and disclosure using packet analysis.[4] The encryption used by SSH is intended to provide confidentiality and integrity of data over an unsecured network, such as the Internet, although files leaked by Edward Snowden indicate that the National Security Agency can sometimes decrypt SSH, allowing them to read the contents of SSH sessions.[5]
On 6 July 2017 the government transparency organization WikiLeaks confirmed that the US Central Intelligence Agency had developed tools that can be installed on computers running Microsoft Windows or GNU/Linux operating systems to đánh chặn SSH connections started by SSH clients on the bị tổn thương systems.[6]