Anyone know how to uploading files from my computer to Ubuntu server? in Help

edited February 2016 in Help
Thanks for coming in.
I have just deployed an Ubuntu server in vulter. And I just cannot upload any files to the server from my computer.
I tried ssh and ftp, but none of them actually worked.
If anyone knows how, please tell me how it could be done.
I know it is a basic question, but it'll be so kind if someone could help me solve it.

The server is running Ubuntu 15.10 and located in Paris.
I tried using putty and winscp, but they did not work.

Thanks in advance if anyone can help.


  • Did you set up a non-root account on the VPS and enable OpenSSH?
  • Skip FTP entirely; SSH includes SSH (secure shell), SCP (secure remote copy), and SFTP (secure FTP), all over the same channel... it's much easier to configure and use than anything else.

    You can achieve better security and convenience through key-based authorization, rather than passwords (it can be a pain to provision and maintain good passwords, on cloud infrastructure especially.)

    On Windows, PuTTY and WinSCP are good tools. WinSCP, especially, will be very comfortable for you, if you're looking for an FTP-like file transfer program. PuTTY, IIRC, stores its keys in a different format than the standard one for *nix hosts, so you have to learn how to convert back and forth, at least initially, to make use of key-based auth... that's unfortunate, because key-based auth is otherwise extremely easy/simple to use and configure after you figure it out the first time. But it isn't a huge drawback, especially w/ PuTTY's simplicity and ease of availability.

    == More About Key-Based SSH Authentication ==

    The basic idea is you:

    - 1) generate a key-pair on your client device (e.g., home PC),

    - 2) add your public key (which you can pretty much share freely w/o security concerns) to the list of authorized keys on the host you want to connect to, and then,

    - 3) when you use SSH/SCP/SFTP, or whatever else like Git, you just connect automatically, and don't have to enter a password. You can even disable passwords altogether on the host, or at least make them very secure against brute-force attacks, because they no longer need to be convenient for you on a daily basis.


    On Unix and Linux, SSH configuration is kept in your user's home directory, under ~/.ssh
    ~/.ssh/id_rsa is usually your private key (never share this; ideally, never move it off the host where it was generated); ~/.ssh/ is the corresponding public key, and ~/.ssh/authorized_keys is where you put public keys (one per line) of remote users who should be able to login as you. Vultr automates the copying part, by letting you upload your SSH pubkey to the web UI, associate it with one of their default OS images at deployment-time, and then copying it to the right place for you as it installs.

    Your issue connecting may be one of user names; you need to specify the correct remote user name, or you won't get in; by default, SSH will use the same username as your current one one your client machine, and that's usually going to be incorrect for you.
    I think Vultr's images tend to put the pubkey into the root user's authorized_keys, so when you connect you'll need to specify "root" as your username.

    Remember that you have a local console available via the web UI, if you need to inspect root or your user's ~/.ssh/authorized_keys file. Also, heads up, SSH is very picky about the permissions on ~/.ssh files; if you get errors about insecure permissions there, you can use this command:

    chmod -R u=rwX,go= ~/.ssh


    Finally, I'd like to point out that while SSH key-based authentication can be a boon for security, it can also expose you to more (or at least different) vulnerabilities and attack vectors. Protect your private keys, always. The most important and effective thing you can do to keep safe, is something you will eventually be tempted to disregard for convenience:

    ** It's super important to set a very secure passphrase on the key itself, when you generate it. You'll be able to leave this blank, but that means anyone that gains access to your key file will gain access to *all* of your systems. Instead, you should take this passphrase more seriously than a typical password (because if someone does obtain your passphrase-encrypted key, they are free to brute-force it off-line, without making any entries in your log files, and without any of the rate-limiting effects that make brute-forcing less practical/effective for online systems). **

    (Once you have the basics down, there are secure tools available to mitigate the inconvenience of strong key passphrases.)


    Hopefully, something in there was informative for you.
    If you continue to have problems, feel free to post more details.

  • I'm sorry, I really have no idea how that turned into a novel.
  • Thanks a lot by writing in such detail, which has been a great help for beginner like me.
    However, I still need some extra help.
    I've enabled the openssh-server on my server and set up a non-root user on the server.
    I tried winscp as a tool. However, after a long time of "serching for host...", it warned me

    Network error: Connection to "my server's ip" timed out.

    I do not know what is happening because I can use the control console, which means I can connect to my server.

    I tried both SCP and SFTP and using the username and password I just created. The port number was 22.
  • Ah, it occurs to me that Ubuntu does not install or start (can't remember which) the SSH server by default. Perhaps you need to login via the console, as root, and do:
    apt-get install openssh-server
  • oh, I know that as well. I am sure I did install openssh-server
  • Would it be convenient for you to connect to IRC? I'm currently connected to the #vultr channel on, and I could probably help you debug it much easier via real-time comms.
  • sorry about that, but I am currently in China and IRC seems to be blocked by GFW.
    Sorry for the inconvenience.
  • Perhaps it blocks SSH as well? :)

    Some things I would check:

    - Is sshd actually running on Ubuntu host? as root, do:
    netstat -tlnp | grep sshd

    - Does there seem to be a firewall in front of SSH on Ubuntu?
    From a machine across the internet, preferrably as root, do:
    nmap -T5 -P0 -sT -p 22
  • Also, the control console does not actually connect to your server, at least not directly / in the way you're thinking; it connect to one of Vultr's servers, and eventually through to the machine hosting your virtual machine. That's a very different way to get at it, and doesn't involve or require any of the Ubuntu machine's networking stack.
  • I use 'Bitvise SSH Client" & there's a separate window to exchange files between two systems. It's very easy..U just hv to drag & drop
  • Vouch for Nomaskzz answer ^
Sign In or Register to comment.

Registration Required

A account is required to use the forum. Click here to sign in.

Quick Links