Obtaining the Host Key for SFTP Configuration (Video Transcript)
0:00
In this video, you will learn how to obtain a host key to configure the SFTP server.
0:06
Ensuring that the SFTP server is validated is essential for the SFTP protocol.
0:11
Validating the server is required,
0:13
and the key is designed to protect against man-in-the-middle attacks where the hacker
0:17
intercepts,
0:18
and relays an impersonated message to the other party.
0:21
ssh-keyscan is a utility for gathering the public ssh host keys of the SFTP host.
0:27
Follow these instructions to obtain the host’s public key information.
0:30
Verify the workstation or server from which you execute the following commands, can access
0:35
the SFTP server.
0:37
Open the command prompt or terminal, and complete the following actions:
0:41
On Microsoft Windows, open the “Command Prompt” (or cmd).
0:45
On an Apple macOS, open the “Terminal.”
0:48
For this demonstration we will use Microsoft Windows.
0:51
I enter ssh-keyscan in the command prompt.
0:55
Replace with the fully qualified domain name of the SFTP server.
1:00
When using a non-standard port (other than port 22), I enter ssh-keyscan -p .
1:09
Replace with the port the SFTP server is listening to, and replace with
1:15
the fully qualified
1:16
domain name of the SFTP server.
1:18
You can generate the host key with IP address of the SFTP Server.
1:22
An example would be, ssh-keyscan server1.example.com.
1:28
The above command should return text following this format:
1:31
.
1:36
For example I enter ssh-keyscan server1.example.com from my command prompt on Windows, or Terminal
1:45
on Mac OS.
1:46
After running this command it will return the following value shown on the screen:
1:50
After examining the return value, copy and paste this return value into the SFTP configuration.
1:57
In a second example, I use the command C:\Users\ssh-keyscan server2.example.com
2:09
After running this command it will return the following value shown on the screen:
2:13
Copy and paste this return value into the SFTP configuration.
2:17
To copy and paste the value,
2:19
From the Toolbox menu, select System Setup, and then SFTP Configuration.
2:24
Click New, and on the Manage SFTP Configuration screen, paste the value in the Host Key box.
2:32
Ensure that the text you copy does not include the command, extra blank lines, or whitespaces.