SSH into the VM on port 2222
Overview
SFTP Gateway v3.x uses port 2222
for the SSH protocol,
since the Java SFTP service is bound to port 22
.
When you connect over SSH, you need to override the default port.
Connect over Port 2222
Use the following command to SSH into the VM:
ssh -i private.key ubuntu@<ip-address> -p 2222
Replace ubuntu
with the Linux admin user you specified when provisioning the Linux account.
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 the hostname and port.
The default SSH port is 22
, so you need to explicitly set port 2222
which is the port OpenSSH listens to.
SCP
When using SCP (which uses SSH behind the scenes), you will also need to specify port 2222
:
scp -P 2222 local-file.tar.gz ubuntu@<ip-address>:/home/ubuntu/
PuTTY (Windows)
- Open PuTTY and select SSH as the connection type.
- In the Host Name field, enter
username@<public-ip>
- In the Port field, change
22
to2222
- Expand the SSH section on the left, and click on Auth.
- Click on Browse to browse for the
.ppk
key, and click Open when you have selected it. - To launch the SSH session, click Open.