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

I'm Ito, an infrastructure engineer.
By connecting to the server via a jump server, it's possible to block direct external access to the server and reduce the risk of unauthorized access and other problems.

This is the configuration.
SnapCrab_NoName_2016-1-19_11-0-39_No-00-min
End users can only access the web server via HTTP, while developers and others who configure the servers can connect to each server via SSH through a jump server.

While SCP is often used when uploading content,
if a jump server is present, it becomes impossible to connect to the target server via SSH or FTP.

Therefore, the followingWinSCPexplains how to connect via a jump server using

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 prompted to enter the passphrase for your private key.
You will be prompted twice, once to log in to the jump server and again to log in to the end server from there.

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 helpful,please give it a "Like"!
14
Loading...
14 votes, average: 1.00 / 114
94,081
X Facebook Hatena Bookmark pocket

The person who wrote this article

About the author