5

I want to download a complete off line openssh-server package installer. I need the offline package to setup for my school project but I don't have the internet facility in the lab.

3 Answers 3

8

I know that this is an old question, but I stumbled upon it and it came very close to solving my problem on Ubuntu 14.04.

I thought I would post some additional instructions to add to the answer that was given above by yossile. I had to make a few minor modifications to their instructions for complete success.

  1. Download the openssh-server package (this grabs the .deb file):

    sudo apt-get download openssh-server 
    
  2. Download the dependencies for openssh-server:

    sudo apt-get build-dep --download-only -o dir::cache=PATHFORDEPS openssh-server
    
    • PATHFORDEPS is where you want the downloaded dependencies to be saved.

    • the --reinstall option has been removed. It was throwing an error in 14.04, but the remainder of the command works as it should without it.

  3. Download additional dependencies (the above command didn't grab these):

    sudo apt-get download openssh-sftp-server openssh-client
    
  4. Install OpenSSH Server (be sure all .deb files are in the same folder):

    sudo dpkg -i *.deb
    
1
  • I just wanted ssh server, and the command sudo apt install ./openssh-server-xxx.deb from within the directory containing all .deb files did the trick. Thank you.
    – Deepak D
    Aug 16, 2021 at 15:27
5

If you will execute sudo apt-get download openssh-server you will get a .deb file that can be installed offline.

However, as there are several dependencies packages that are required by openssh-server you will probably want to download all of them too.
To do it execute this instead: sudo apt-get build-dep --download-only --reinstall -o dir::cache=<path_to_save> openssh-server. where <path_to_save> is where you want the downloaded dependencies to be saved.

5
  • this is giving me the following error bash: cd: /home/user/dir/sudo: No such file or directory
    – coder
    Mar 18, 2012 at 12:57
  • Are you running Ubuntu?
    – yossile
    Mar 18, 2012 at 12:59
  • yes ubuntu 11.10
    – coder
    Mar 18, 2012 at 13:02
  • sorry you were correct i typed it wrong.Now can you please explain what to do with these packages on the other computers?
    – coder
    Mar 18, 2012 at 13:04
  • Have all .deb in one folder and on the other computer execute 'sudo dpkg -i *.deb'
    – yossile
    Mar 18, 2012 at 14:34
0

Steps:

  • Get the "deb" file
  • Give the command by pointing offline package file

In order to get offline installation file, follow this command:

sudo apt-get –download-only openssh-server

Install it by using “deb” file:

sudo dpkg -i /home/yupana/Desktop/ssh.deb

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .