Jump to content

File transfer between Ubuntu Server and Windows

I have a computer running Ubuntu Server that I need to frequently transfer files to. Is there a way I can do this without having to type a bunch of commands every time I need to move a file?

 

The system I have envisioned is more similar to web server FTP's. Using a program like FileZilla, you can connect to a web hosting server (that is probably not running a UI-based OS like windows) anywhere in the world, and transfer files with effectively drag-and-drop ease. Is there something analogous to this for what I am trying to do?

 

I currently have PuTTY set up with a VM I'm using for testing before I move on to the real thing. While PuTTY would allow me to access the server remotely, I don't think I could transfer files through PuTTY, and even if it was possible, I am trying to avoid using the command line for this. Too inefficient for on-the-fly transfers.

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, kxrider85 said:

I have a computer running Ubuntu Server that I need to frequently transfer files to. Is there a way I can do this without having to type a bunch of commands every time I need to move a file?

 

The system I have envisioned is more similar to web server FTP's. Using a program like FileZilla, you can connect to a web hosting server (that is probably not running a UI-based OS like windows) anywhere in the world, and transfer files with effectively drag-and-drop ease. Is there something analogous to this for what I am trying to do?

 

I currently have PuTTY set up with a VM I'm using for testing before I move on to the real thing. While PuTTY would allow me to access the server remotely, I don't think I could transfer files through PuTTY, and even if it was possible, I am trying to avoid using the command line for this. Too inefficient for on-the-fly transfers.

You mentioned FTP in your post - have you considered setting it up as a FTP server? 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Tabs said:

You mentioned FTP in your post - have you considered setting it up as a FTP server? 

I'm a complete noob to this so I don't know what that means to set it up as an FTP server.

 

Perhaps it would help to make the server's purpose more clear. It is a dedicated minecraft server that my buddies and I will be constantly installing mods, worlds, and plugins on. Plugging in a monitor to the server and using commands to transfer files sounds needlessly inconvenient given that things like FTP exist. Would making the server an FTP and minecraft server fix my problem?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Electronics Wizardy said:

set up samba and then you can mount it as a network drive in windows and accessit like any other local drive. 

 

 

Wow seriously? Lemme try that real quick...

Link to comment
Share on other sites

Link to post
Share on other sites

26 minutes ago, kxrider85 said:

Wow seriously? Lemme try that real quick...

This will work, but only if all of the computers accessing it are on the local network - it's very unsafe (and slow) to expose SMB shares to the internet.

 

From your first and followup posts, it implies your friends may be connecting over the internet - is that the case?

 

In case you decide to explore this route, this is a good primer on setting up ftp on an ubuntu server, it doesn't require a monitor or anything on the server, only on the computers using gui-based ftp clients like Filezilla, though ftp can be accessed via the command line as well.

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Tabs said:

This will work, but only if all of the computers accessing it are on the local network - it's very unsafe (and slow) to expose SMB shares to the internet.

 

From your first and followup posts, it implies your friends may be connecting over the internet - is that the case?

 

In case you decide to explore this route, this is a good primer on setting up ftp on an ubuntu server, it doesn't require a monitor or anything on the server, only on the computers using gui-based ftp clients like Filezilla, though ftp can be accessed via the command line as well.

Okay I will try that. I just got Samba working so that's good. I will follow up once I get the FTP running :)

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, kxrider85 said:

Okay I will try that. I just got Samba working so that's good. I will follow up once I get the FTP running :)

FTP is pretty old and insecure. It's best used today for public shares.

 

Try SSH or HTTPS Webdav, SSH is preferred if it's just you or a few people. WinSCP is a graphical SSH client for Windows. Your already using Putty so there is no work to do here.. just install and use. SSH can be set to restrict shell access to just SFTP.

 

Webdav can be mounted by windows just like Samba/CIFS. (Apache mod_dav + Lets Encrypt is a good way to do this)

 

(note on ssh: your clients should have public keys, password authentication for ssh is vulnerable to brute force attacks on the net, FreeBSD has brute force protection built in to it's OpenSSH server via blacklistd but you need to set "UseBlacklist yes" in sshd_conf and configure PF. Ubuntu does not have this, so use key authentication only on Ubuntu.)

"Only proprietary software vendors want proprietary software." - Dexter's Law

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, jde3 said:

FTP is pretty old and insecure. It's best used today for public shares.

 

Try SSH or HTTPS Webdav, SSH is preferred if it's just you or a few people. WinSCP is a graphical SSH client for Windows. Your already using Putty so there is no work to do here.. just install and use.

 

Webdav can be mounted by windows just like Samba/CIFS. (Apache mod_dav + Lets Encrypt is a good way to do this)

 

 

ok i have WinSCP installed. What file protocol do I choose for SSH? I was able to get connected to the server using SFTP, but I'm not sure if that's the right thing??

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, kxrider85 said:

ok i have WinSCP installed. What file protocol do I choose for SSH? I was able to get connected to the server using SFTP, but I'm not sure if that's the right thing??

That is fine. Both SFTP and SCP are sub programs of SSH. (some systems don't have SFTP enabled this is why it asks you that, most do though.)

"Only proprietary software vendors want proprietary software." - Dexter's Law

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, jde3 said:

That is fine. Both SFTP and SCP are sub programs of SSH.

Okay. That leaves one last thing. What would be the procedure to get it to work with my friends? I am currently using my local ip to connect to the server which obviously wouldn't work. Do I open some port or something?

Link to comment
Share on other sites

Link to post
Share on other sites

Use putty to generate a public/private key pair. Save your private key then publish your public key to the server in the ~/.ssh/authorized_keys file. Test it and then set "PasswordAuthentication no" in Ubuntu.

 

Here is a guide. there are many out there.

 

https://www.ssh.com/ssh/putty/windows/puttygen

"Only proprietary software vendors want proprietary software." - Dexter's Law

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, kxrider85 said:

Okay. That leaves one last thing. What would be the procedure to get it to work with my friends? I am currently using my local ip to connect to the server which obviously wouldn't work. Do I open some port or something?

It depends what route you want to go.

 

If this is good for you and this is what you want then you can make a public account and have your users generate ssh keys and sending you the public keys. (you can remove their access by deleting their key from the server.) You can also create individual accounts if you want. If you just want to give them file access then limiting SSH to sftp only would be good.

 

If you want to go webdav that is something different. If you want to get super fancy you might use something like Nextcloud maybe. It depends on your reliability.. but webdav they can just mount like a network drive in windows. So it depends what kind of interface you want to provide to your users.

"Only proprietary software vendors want proprietary software." - Dexter's Law

Link to comment
Share on other sites

Link to post
Share on other sites

SFTP is one of the best to use since you want to share externally. SFTP is widely supported, and easy to setup on clients. The best is as jde3 mentioned, to harden your linux box by using rsa key authentication. This means the user doesn't require a password, and it strengthens it agaisnt a brute force attack. 

 

A good How-To on setting it up on Ubuntu: https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-1604

Heres a good tutorial on hardening your Ubuntu installation for security as well (not all of it will be applicable e.g apache): https://www.thefanclub.co.za/how-to/how-secure-ubuntu-1604-lts-server-part-1-basics

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, jde3 said:

It depends what route you want to go.

 

If this is good for you and this is what you want then you can make a public account and have your users generate ssh keys and sending you the public keys. (you can remove their access by deleting their key from the server.) You can also create individual accounts if you want. If you just want to give them file access then limiting SSH to sftp only would be good.

 

If you want to go webdav that is something different. If you want to get super fancy you might use something like Nextcloud maybe. It depends on your reliability.. but webdav they can just mount like a network drive in windows. So it depends what kind of interface you want to provide to your users.

Alright, cool. There is a lot of options to consider and I am not quite sure what I want to do with remote access yet but Samba is working locally for now. Thanks so much for all of the help guys!

Link to comment
Share on other sites

Link to post
Share on other sites

  • 6 months later...

You mentioned FileZilla, why not use SFTP in FileZilla? You already have SSH set up, use the login information you've been using in putty and you're pretty much good to go, No configuration required

75% of what I say is sarcastic

 

So is the rest probably

Link to comment
Share on other sites

Link to post
Share on other sites

SFTP in filezilla is really easy to use. I use that to transfer files from my linux server to my local PC. You need a puttygen.exe (you can download it from putty) to convert the openssh key into ppk format but that's probably everything you need.

Link to comment
Share on other sites

Link to post
Share on other sites

13 hours ago, noodle with crab said:

SFTP in filezilla is really easy to use. I use that to transfer files from my linux server to my local PC. You need a puttygen.exe (you can download it from putty) to convert the openssh key into ppk format but that's probably everything you need.

I ended up going with SFTP on WinScp. I port forwarded ssh and created a public/private key pair for authentication. Everything has been working fine. My friends can access the server terminal, and as long as my friends don't give out the private key, everything should be fine... 

 

The only thing I have noticed is that I cannot edit text files in winscp and for some reason starting a putty terminal from a winscp session always times out.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×