Ubuntu

How to use Ubuntu as a remote fileserver for uploading and downloading files

If you have an old computer, use Ubuntu, or another Linux distribution, to give it a second life as a fileserver

5 years ago

Setting up an old computer to act as a remote fileserver is a lot easier than it sounds. The hard part is just installing Ubuntu, or any other Linux distribution on it. If you're not sure how to do that, Canonical, the company behind Ubuntu, has a great tutorial, which you can read by clicking here. Or, just do a search for "How to install Ubuntu." It's really easy, and there's a lot of great tutorials out there.

So, assuming you've installed Ubuntu and you're ready to go, what's next?


Step 1a: Install an SSH Key on the remote computer

To use our remote computer as a fileserver, we'll be using SSH / SFTP. Open the terminal on Ubuntu (shortcut: ctrl+alt+t) on our remote computer, and type the following:

ssh-keygen

This will create a public/private ssh key pair. By default, it will ask you if you want to save the key in your /home/username/.ssh directory. Press enter to accept the default choice (you can specify a different path if you like). You can also specify a passphrase, but this is optional. Personally however, I always use a passphrase just in case.

Step 1b: Make a copy of the private key

The above command did two things. First, it created a public key with the name id_rsa.pub in our /home/username/.ssh directory. That file stays on the remote computer.

Second, it created a private key with the name id_rsa in the same directory. Open your /home/username/.ssh directory, and copy that file onto something like a thumb drive. You can also email it to yourself as an attachment.


Step 2: Configure your network to accept SSH connections

Now that we have an SSH key on our remote computer, we need to configure the network to which that computer connects to allow incoming SSH connections. This sounds difficult, and it kind of is difficult. However, it doesn't require any strong technical knowledge, or even decent technical knowledge. Just take it slow.

Step 2a: Get your internal and public IP address

Before we do anything else, we need to figure out what internal IP address our remote computer uses when it's just connecting to the local network. In the terminal, type the following command:

ip addr show


There's a lot of unnecessary information for our purposes here. Just take note of what the highlighted text says on your computer.

Next, we need to know what our external IP address is when connecting to the Internet. For this, just do a Google search for "my IP address." That will return your external / public IP address. Make sure to write it down.

Step 2b: Configure our router

What you'll need to do next is change some advanced settings in your network router. To do this, we'll need to access the router's administrative dashboard. Normally, you can find the url for the dashboard on a sticker on the router, along with the username and password. If there's no sticker, check the manual for the router.

In almost all cases, the url is going to be http://192.168.1.1. On Verizon, this will take you to a screen like this one:


Type in the username and password, and log in.

On a Verizon router, go to Firewall then to Port Forwarding. If you don't see a menu option for Firewall, click on Advanced Settings then select Port Forwarding. If your router is not from Verizon and doesn't have these options, do a Google search for your router's brand with the words "port forwarding."

On the port forwarding page, select your computer's internal IP address. And then in the "application to forward" menu, choose SSH or SFTP. If these options are not available, choose custom port and then choose TCP and type in 22 in the port number box:



Step 3: Save the private key on your normal computer

We are done with our remote computer! Now go back to your normal computer, and save the private key there. If you're using Ubuntu or another Linux distribution, I recommend saving it in the /home/username/.ssh directory.

And... that's it! You can now access your old computer using its external IP address and the private key you created from anywhere in the world. If you're on Windows, I recommend using WinSCP or Filezilla.

To connect in a command line terminal, just type the following:

ssh username@remoteExternalIP -i /path/to/ssh/private/key


Step 4: For Linux users, how to easily connect to your remote computer

If you're using Ubuntu or another Linux distribution on your normal computer, it's really easy to connect to your remote computer and mount it as a normal filesystem. To do this on Ubuntu, open the Nautilus File Manager, and go to "Other Locations." From there type ssh://yourRemoteExternalIp into the "Connect to Server" area:


In this case, if you click connect, you'll be prompted for the username and password on your remote computer. But, with a few adjustments, we can use our private key for authentication.

In your /home/username/.ssh directory, create a text file with the name "config". Open that file in a normal text editor, and type the following:

Host {insertCustomNameHere}
    Hostname {insert external IP address of remote computer}
    User {username on remote computer}
    IdentityFile /home/{username on normal computer}/.ssh/id_rsa

Save the file, and go back to the "Other Locations" area. Now just type ssh://CustomNameYouChose into the "Connect to Server" box. After pressing connect, you may need to enter a passphrase if you chose one earlier. Otherwise, voila! That's it. if you open the terminal, you can also connect just by typing:

ssh CustomNameYouChose

Now, that wasn't so bad, right? You can now use your old remote computer as a fileserver from anywhere in the world.

Post Comments(12)

Loastip

Original magnifications 20 B and 40 C <a href=https://bestcialis20mg.com/>brand name cialis online</a>

1 year ago

Edison

cialis online australia paypal cialis in usa where can i buy cialis online order liquid cialis online ordering cialis online in canada

1 year ago

Stevenskype

<a href="https://turhaberleri.online/">Türkiye Haberleri</a>

1 year ago

JacksonGap

en çok çıkan 10 numara rakamlarımavera 1 bölüm izle <a href="https://tee-shirts.online/en-ucuz-alueminyum.php">en ucuz alüminyum</a> galaxy s7 edge yorumlarıbirey c matematik çözümleri pdf hyundai accent blue otomatik şanzımanunlulerin ami <a href="https://tee-shirts.online/puma-yeil-krampon.php">puma yeşil krampon</a> eskiya dunyaya hukumdar olmaz 119 bolum tek parca101 fm canlı dinle kolpaçino 3 izlebilet al sat sitesi güvenilir mi <a href="https://tee-shirts.online/empire-total-war-rusya-rehberi.php">empire total war rusya rehberi</a> balo maskesi satın aldraven rün dizilimi elbistan spor bal ligi puan durumuen ucuz armani code bayan <a href="https://tee-shirts.online/yabanc-polisiye-radyo-tiyatrosu.php">yabancı polisiye radyo tiyatrosu</a> hülya kent sitesi2 el fiskos sehpa batman tuncelilereldiven standı <a href="https://tee-shirts.online/lotto-outdoor.php">lotto outdoor</a> 2018 sıralamalarıbeni bırakma 22 bölüm

1 year ago

Arturofreef

slash typographical chart <a href=http://bag33ondu.com>bag33ondu.com</a> <a href='http://bag33ondu.com'>bag33ondu.com</a> http://bag33ondu.com mistress intend draft

1 year ago

HINNANUND

cialis reacciones adversas Bjwtwa https://newfasttadalafil.com/ - Cialis Viagra Superactive Plus <a href=https://newfasttadalafil.com/>Cialis</a> Cialis Dolor De Piernas https://newfasttadalafil.com/ - Cialis Priligy Dapoxetina Precio

1 year ago

Tysondib

MEET HOT LOCAL GIRLS TONIGHT WE GUARANTEE FREE SEX DATING IN YOUR CITY CLICK THE LINK: <a href="https://about.me/alexa.smith">FREE SEX</a>

2 years ago

Tysondib

MEET HOT LOCAL GIRLS TONIGHT WE GUARANTEE FREE SEX DATING IN YOUR CITY CLICK THE LINK: <a href="https://about.me/alexa.smith">FREE SEX</a>

2 years ago

adurido

<a href=http://vsdoxycyclinev.com/>doxycycline 100mg canada

2 years ago

adurido

No Script Tretnoin Aliclescadia <a href=https://bansocialism.com/>online generic cialis</a> felpnoretelt Priligy Mas Viagra

3 years ago

LesSleecy

Tadalafil Generic Vs Cialis https://viacialisns.com/# - Cialis Find Finasteride Legally Tablet <a href=https://viacialisns.com/#>cialis cost</a> Prednisolone Tablets Online

3 years ago

Eleosar

Rx4 Pharmacy https://apcialisle.com/# - Cialis Free Levitra.Com <a href=https://apcialisle.com/#>Buy Cialis</a> Kamagra With Dapoxetine

4 years ago

Leave a reply