The most normal thing in the world is that we configure our repos in Debian, Ubuntu or derivatives pointing to the official repos via HTTP or FTP, that is, I edit the file /etc/apt/sources.list and put something like this:
deb http://repos.mired.net/ubuntu-precise/ precise universe multiverse restricted
Or with Debian:
deb ftp://repos.mired.net/debian/wheezy/ wheezy main contrib non-free
And this is fine, there is nothing wrong with it.
The point is that sometimes we need to update and install software on a home computer or, for example, on a server of our company, and we need to do this without many complications, without having to install a web server (Apache, Nginx, etc. ) on our FTP server (Updating from the internet is ruled out many times because it consumes bandwidth and time, in addition, when using the browser to find the route of the repository we can entertain ourselves with some type of free ads), we need to update and voila, not having to install Apache or pure-ftpd, far from it ... for this we can use SSH.
SSH is the way we control our computers remotely, it is a service that is installed by default on each server, well, to tell X server / computer that it should use the repos located on server Y, we configure our / etc / apt /sources.list as follows:
deb ssh://firstname.lastname@example.org:/var/www/ftp/repos/debian/wheezy/ wheezy main contrib non-free
As you can see, the startup deb is kept, then we change http / ftp to ssh, followed by the user with which it will be accessed and the server that will be accessed, then we indicate exactly the location of the repository using: / path as shown on the line, then we have the usual, the version of the distro and the branches of the repo.
Then there is the usual thing:
And that is where it will not be updated automatically, that is, when you tell the system to use that repository via SSH, the system will ask you if you want to add SSH to the known servers to this new one, they indicate yes by typing yes and pressing Enter, then it will ask for the root password and when you put it, the process of updating the indexes will begin, which is what they indicated 🙂
This has been really useful for me, because I have my virtual server configured like this (I use Arch, but my virtual server uses Debian), it still saves a lot of work or bandwidth, right? 🙂
Anyway ... I hope this has been useful for you 😀