[Illustrated] Explaining how to connect to a jump server using WinSCP

My name is Ito and I am an infrastructure engineer.
By connecting to a server via a jump server, it is possible to block direct access to the server from outside and reduce the risk of unauthorized access.

The configuration is something like this.
SnapCrab_NoName_2016-1-19_11-0-39_No-00-min
End users can only access the web server via HTTP, and developers who set up the servers can connect to each server via SSH via a jump server.

SCP is often used when uploading content, but
if a bastion server is used, you will not be able to connect to the target server via SSH or FTP.

So, below we explain how to connect via a jump server using WinSCP

Session part

First, enter the following into the WinSCP window:

winscp1

Transfer Protocol SCP
Hostname Local IP address
Port number 22
Username User name of the server to connect to via the jump host
password Password of the server to connect to via the jump host

tunnel

Next, go to [Settings] - [Connection] - [Tunnel] to set up the connection to the jump server

winscp2

Connecting via an SSH tunnel Check
Hostname Host name or IP address of the bastion server
Port number 22
Username User name to connect to the bastion server
password Password to connect to the base server
Local Tunnel Port Auto Select
private key The private key (.ppk) required to connect to the bastion server

(The private key is required if the end server is a key connection.)

certification

Configure the authentication conditions in [Settings] – [SSH] – [Authentication]

Just make the following settings in the "Authentication Conditions" section in the middle

  • Check "Allow agent forwarding"
  • Select the private key you just created

Connect

When connecting with the above settings, you will be asked to enter the passphrase for your private key.
You will be asked to enter it twice, once to log in to the jump server and once to log in to the end server.

winscp3

This will connect successfully

Connecting via a jump server is a bit of a hassle, so please try connecting using this method!

If you found this article useful, please click [Like]!
14
Loading...
14 votes, average: 1.00 / 114
92,952
X Facebook Hatena Bookmark pocket

The person who wrote this article

About the author