SFTP Gateway v3.0 uses port
2222 for the SSH protocol,
since SFTP is bound to port
When you connect over SSH, you need to override the default port.
Connect over Port 2222
Use the following command to SSH into the EC2 instance:
ssh -i private.key ec2-user@<ip-address> -p 2222
Note: You will be prompted to accept the server host key on first connection. The server host key is cached on your client machine, based on both the hostname and port.
If you were to SSH without specifying port
2222, you would default to
Your intention is to authenticate with the Linux OpenSSH service, which
is listening to port
The separation of SSH and SFTP onto different ports is specific to SFTP Gateway v3.0.