Xshell Tutorial

Using tunneling service for an email client of POP3 and SMTP protocol

Last modified: Tuesday, November 11, 2014 10:27 PM

For example, you are at home and want to retrieve your email from the server machine at work with a POP3 client program. If you connect to the server directly, your email client will send your login and password information as plain text. This means that malicious users might intercept your important account information.
To prevent this, you can use the SSH tunneling feature provided by Xshell. Xshell establishes a secure tunnel between your PC at home and the mail server at work. Then, the POP3 client connects to the local Xshell rather than connecting to the mail server directly. Xshell forwards all traffics to the mail server over the secure tunnel and transfers all traffics received from the mail server to the POP3 client. This is called "port forwarding mechanism".

In this document, you will learn how to configure the port forwarding rules for your email client, Outlook Express, and Xshell over the secure SSH tunnel.
First of all, you should make sure that email clients are using two TCP ports, POP3 and SMTP. When you read a mail from the server, you connect to the POP3 port (usually number 110). When you send a mail, you connect to the SMTP port (usually number 25) of the server.

Step 1: Configuring Xshell

  1. On the File menu, click Open. The Sessions dialog box shows up.

  2. Click on the session that you want to configure tunneling service.
  3. Click Properties on the toolbar. The Properties dialog box shows up.
  4. After you select the Protocol as SSH, Click Tunneling category.
  5. In the TCP/IP Forwarding section, click Add to add a POP3 port forwarding rule. The Forwarding Rule dialog box will shows up.



  6. In the Type list, select Outgoing (from local to remote).
  7. In the Source Host, enter "localhost"
  8. In the Listen Port field, enter 110 for the POP3 protocol. This port number will be used in the Outlook Express.
  9. In the Destination Host field, enter "localhost" or the hostname of the server.
  10. In the Destination Port field, enter 110.
  11. Click OK to save this forwarding rule.
  12. In the TCP/IP Tunneling section, click Add to add a SMTP port forwarding rule.



  13. In the Type list, select Outgoing (from local to remote).
  14. In the Source Host, enter "localhost"
  15. In the Listen Port field, enter 25 for the SMTP protocol. This port number will be used in the Outlook Express.
  16. In the Destination Host field, enter "localhost" or the hostname of the server.
  17. In the Destination Port field, enter 25.
  18. Click OK to save this forwarding rule.
  19. In the Advanced SSH Options dialog box, click OK.
  20. In the Properties dialog box, click OK.

Step 2: Configuring Outlook Express

  1. On the Tools menu, click Account.... The Internet Account shows up.
  2. Select an account which will be forwarded, and click Properties.
  3. Click Servers tab.

  4. In the Incoming mail(POP3) box, enter "localhost".
  5. In the Outgoing mail(SMTP) box, enter "localhost" or the hostname of the mail server.
  6. Click Advanced tab.
  7. In the Outgoing mail (SMTP), enter 25.
  8. In the Incoming mail (POP3), enter 110.

Now, you are ready to use Outlook Express over the secure SSH tunnel. Be sure to connect to the server using Xshell before sending and receiving mails in Outlook Express.