How to use WinSCP to connect to a Linux VM in Yandex Cloud with a key generated at VM creation
Issue description
You need to connect to a Linux VM in Yandex Cloud via WinSCP with the key generated at creation.
Solution
To connect to a Linux VM using WinSCP, specify these connection parameters:
File protocol
:SCP
orSFTP
Host name
: IP address of the VMUser name
: Username specified when creating the VMPassword
: Leave blank because you are going to use SSH key authentication.
Next, click Advanced, select SSH – Authentication, then enable the Allow agent forwarding
parameter in the Authentication parameters section. After that, in the Private key file
field, select the SSH private key file and click OK. Now you can connect to the VM to transfer files via SCP or SFTP protocol by clicking the Login button.
This guide is relevant if you did not set a password for the user. If you have already connected to the VM using an SSH key and set a password using the sudo passwd username
command, then, in item 4, Enter the user password and click Login.
For security reasons, access to the VM is possible only by an SSH key by default.