0

Hi I have installed ubuntu from bootable usb. During installation I did not pay attention for Openssh server in software selection screen. however is it possible to reboot from usb to just install openssh only without affecting anything which is already installed and configured? Just like we install feature/server role in windows!!! Thanks. I dont have internet connection in my server yet. thanks.

  • Hi! To do this please use sudo tasksel. But before that what is in your sources.list file? Upload it to http://pastebin.com/ Thanks – Armand Bozsik Jan 24 '16 at 8:11
  • Thanks Armand Bozsik. What did you mean by "But before that what is in your sources.list file?". Servers are not accessible now, just asking, If I use 'tasksel' where the oppenssh source will come from? are these packages available in the server repository? – Rafiqul Islam Jan 24 '16 at 9:30
  • No. If you dont have internet connection you should install using apt-cdrom described here Then if you successfully told APT to use this source instead of the online ones you can use the usual command to install. Please note: the number of packages on a cd-rom are limited due to the size restrictions. – Armand Bozsik Jan 24 '16 at 10:16
0

Rather, you can download the .deb file on any other machine which is connected to the Internet. Using the following command:

sudo apt-get install download openssh-server

The, install the .deb image on the server using the following command:

sudo dpkg -i /home/himanshu_code/Desktop/ssh.deb
  • himanshu, i dont have remote connectivity with my server, thats why i am trying to install openssh from usb. – Rafiqul Islam Jan 25 '16 at 9:31
0

If you have the *.iso of your Ubuntu, then the debian package can be retrieved.

  1. First mount your iso:

    sudo mkdir /media/iso; sudo mount -o loop /path/to/iso /media/iso
    
  2. Now, mount the squash present in the iso:

    sudo mount -o loop /media/iso/casper/filesystem.squashfs /mnt
    
  3. To retrieve your package, you need a tool called dpkg-repack

    dpkg-repack --root=/mnt openssh-server
    
  • my usb is visible on fdisk -l. but once i run mount command then it prompts error like file system not found. server file system ext2, but usb is FAT, any idea? – Rafiqul Islam Feb 2 '16 at 3:34
  • What is the exact command that you ran? – Raphael Feb 2 '16 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.