Unable to connect via SFTP

So just created a FreeBSD 12 server, which I can log into via SSH but cannot get into it via SFTP.

The following works and prompts for the root password:
ssh -i ~/.ssh/vultr_rsa root@xxx.xxx.xxx.xxx

When I try to connect using an SFTP client it fails to login.

In the past, mostly with AWS, whenever I have got SSH working SFTP also just works, so I'm guessing that AWS have changed something in their image that Vultr hasn't.

In FreeBSD 12 do you normally need to install/configure anything to get SFTP working?

Comments

  • New info: Have just tested with Linux (CentOS 7) and have the exact same issue. So I'm wondering if it's something Vultr specific preventing SFTP from working?
  • OK, got a step closer. The SSH key was being ignored, hence the password prompt. Had to resort to logging in with username and password.

    It appears that when you create a new server in Vultr and select an SSH key it makes no difference and doesn't actually do anything.

    The docs state "An SSH Key allows you to log into your server without needing a password. SSH Keys can be automatically added to servers during the installation process." but that either isn't the case or there's a mystery step that's not mentioned.
  • Hello,

    I have confirmed that the SSH key functionality is working as designed (confirmed on CentOS 7). Here are the steps to follow.

    1. Create a new SSH key on ( https://my.vultr.com/sshkeys/manage/?SSHKEYID=new )
    2. Deploy a new VPS instance. Be sure to select the SSH key in step 6 when deploying. ( https://my.vultr.com/deploy/ )
    3. Log into your server with an SSH client, using your SSH key. For example ( root@x.x.x.x ).

    If the SSH authentication is failing, you can log into the server with password authentication and check the SSH key file at ( /root/.ssh/authorized_keys ). You may need to turn on debug or verbose mode with your SSH client to catch any authentication errors. More information may be available in your server's logs as well ( typically /var/log/ ).
Sign In or Register to comment.