LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Install ssh on offline computer without downloading each deps manually (https://www.linuxquestions.org/questions/linux-newbie-8/install-ssh-on-offline-computer-without-downloading-each-deps-manually-4175690008/)

Gad 02-06-2021 01:07 PM

Install ssh on offline computer without downloading each deps manually
 
Hi peeps!

I have a Debian buster machine that I would like to install openssh-server, unfortunately the machine is offline and would like to know if there is a simple way of installing it without having to download each dependency manually.

I have researched online and found apt-offline and went through the man pages for apt however I cant seem to find a solution that meets my needs. I thought maybe I could just transfer a single file from a working machine but something tells me its not possible.

I would like to install ssh on the machine without apt moaning about deps issues.

Thanks

ondoho 02-06-2021 01:38 PM

Quote:

Originally Posted by Gad (Post 6217048)
I have a Debian buster machine that I would like to install openssh-server, unfortunately the machine is offline and would like to know if there is a simple way of installing it without having to download each dependency manually.

I have researched online and found apt-offline and went through the man pages for apt however I cant seem to find a solution that meets my needs. I thought maybe I could just transfer a single file from a working machine but something tells me its not possible.

I would like to install ssh on the machine without apt moaning about deps issues.

If the packages aren't on your system already, there's no other way really.
You could set up a local repository that includes the packages you want to install, or maybe burn a Debian installation DVD that contains what you need, but ultimately you need to get those packages onto your machine somehow, including dependencies of course.

May I ask what use openssh-server is without an internet connection?

Gad 02-06-2021 01:44 PM

Thanks for your reply! I guess without the DVD it will be a much more teething process.

The machine is just a box that I am playing around with at home. I am wanting to setup a little server on a HP Proliant Micro Server that will just sit in a corner and quietly serve. My internet connection is currently down so I guess it was bad timing to start playing.

Ill mark this thread as solved,

Thanks again!

Turbocapitalist 02-06-2021 01:45 PM

You could set up a similar machine and do all of its setup through apt-cacher or squid. Then move the cache over to the offline machine. Or you could mirror the repository and then move that to where the offline machine can get to it.

shruggy 02-06-2021 02:05 PM

There's also apt-offline. And an old howto for it.

HappyTux 02-06-2021 02:23 PM

Not possible you need the support files or it will never install, to find what you need.

Code:

root@buster-raspi:~# apt depends openssh-server
openssh-server
  Depends: adduser (>= 3.9)
  Depends: dpkg (>= 1.9.0)
  Depends: libpam-modules (>= 0.72-9)
  Depends: libpam-runtime (>= 0.76-14)
  Depends: lsb-base (>= 4.1+Debian3)
  Depends: openssh-client (= 1:7.9p1-10+deb10u2)
  Depends: openssh-sftp-server
  Depends: procps
  Depends: ucf (>= 0.28)
 |Depends: debconf (>= 0.5)
  Depends: <debconf-2.0>
    cdebconf
    debconf
  Depends: libaudit1 (>= 1:2.2.1)
  Depends: libc6 (>= 2.26)
  Depends: libcom-err2 (>= 1.43.9)
  Depends: libgssapi-krb5-2 (>= 1.17)
  Depends: libkrb5-3 (>= 1.13~alpha1+dfsg)
  Depends: libpam0g (>= 0.99.7.1)
  Depends: libselinux1 (>= 1.32)
  Depends: libssl1.1 (>= 1.1.1)
  Depends: libsystemd0
  Depends: libwrap0 (>= 7.6-4~)
  Depends: zlib1g (>= 1:1.1.4)
  Conflicts: <sftp>
  Conflicts: <ssh-socks>
  Conflicts: <ssh2>
 |Recommends: <default-logind>
    libpam-systemd
 |Recommends: <logind>
    libpam-elogind
    libpam-systemd
  Recommends: libpam-systemd
  Recommends: ncurses-term
  Recommends: xauth
  Suggests: molly-guard
  Suggests: monkeysphere
  Suggests: <rssh>
  Suggests: ssh-askpass
    ksshaskpass
    kwalletcli
    lxqt-openssh-askpass
    ssh-askpass-fullscreen
    ssh-askpass-gnome
  Suggests: ufw
  Replaces: openssh-client (<< 1:7.9p1-8)
  Replaces: ssh
  Replaces: <ssh-krb5>

You need all the packages it depends on installed, if you have machine that has it installed you will find them in the /var/cache/apt/archives/ if it has not been cleaned. Or a search on the Debian site will get you a download link to the .deb package. This of course would mean you need to go where you can get net connection.

https://packages.debian.org/buster/libpam0g

Gad 02-06-2021 11:41 PM

Thanks everybody for your valuable input, each suggestion is definitely a possible solution. Ill have a look to see which option is possible with my current setup and situation.

computersavvy 02-07-2021 12:55 PM

One very easy way to do that would be to (temporarily) connect to the internet, do the install and upgrade, then disconnect and move it back to where it is isolated as you want it to be.


All times are GMT -5. The time now is 08:54 PM.