Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Ubuntu Help - Trying to use Live CD and give Remote Access
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Ubuntu Help - Trying to use Live CD and give Remote Access

I have a local Centos server that was software bricked when some remote administration went wrong. It was suggested to me that my server could probably be fixed using a Ubuntu live CD, by giving remote access to that by following this protocol:

https://help.ubuntu.com/community/RemoteConnectionUbuntuLiveCD

I am barely Linux literate, but manage to get by in Centos. I know next to nothing about Ubuntu. Here is the error I get when I try to follow the commands from the tutorial. Can someone please help me understand what I am doing wrong and if the suggestion to fix it is the correct one?

ubuntu@unbuntu: $ sudo apt-get install ssh
reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-headers-4.4.0-38-generic: Depends linux-headers-4.4.0-38 but it is not going to be installed
ssh : Depends: openssh-server (>= 1:7.2p2-4ubuntu2.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Comments

  • ihadpihadp Member
    edited February 2017
    sudo apt-get update
    sudo apt-get install openssh-server 
    

    Once you have installed the above you should then be able to connect to your server via SSH.

    Don't know the IP address of your server?

    sudo ifconfig -a
    
    Thanked by 2MTUser2012 vpsGOD
  • Run the 'apt-get -f install' immediately after the update for it to pull in the missing dependencies.

    Thanked by 1MTUser2012
  • @IHaveaDarkPassenger @WSS Thanks for the help. I think I am all set the upgrade went well and I have given ssh access to the LiveCD installation.

  • edited February 2017

    System Rescue CD (http://www.system-rescue-cd.org/SystemRescueCd_Homepage) or booting into rescue mode from from a CentOS (http://www.centos.org) image are better options for situations like this.

    System Rescue CD is already setup for this sort of situation. OpenSSH is installed, and it starts on boot. Setting a root password or creating a user are all that's needed to get SSH access going.

    CentOS images have a rescue mode hidden in the bootloader. "Troubleshooting > Rescue CentOS System" will boot into a minimal environment. You would need to do a little bit more work to get remote access going, but it's nice being able to work in a similar environment during recovery efforts.

    In the past RedHat kernels have included support for technologies that other didn't, LVM mainly, which made it hard to work on RHEL based systems when using other live distros, and the rescue environment is much more similar to a regular CentOS system then a Debian based system, like Ubuntu.

    Installing a full system on a flash drive is another option for emergencies. Staples has pretty good deals on 32GB+ Lexar flash drives every so often.

    Thanked by 1MTUser2012
  • Thank you. This is really, really helpful. I've found for myself that your concerns are correct, spot on. I am running into two problems, one the Ubuntu LiveCD quickly consumes all the space that it allocates itself on install. 2. After I mount the disk that I need to fix by deleting, moving and renaming files, Ubuntu does not recognize it because it is an LVM file system.

    You can see how little I know. I am not averse to learning more, but I don't think I'll ever be great at anything other than following manuals. Given my skills, do you think the best course of action is the system rescue CD, or do you think the manuals/resources for booting this Centos 6 bricked machine into rescue mode and getting ssh going would be within my abilities?

    @flatland_spider said:
    System Rescue CD (http://www.system-rescue-cd.org/SystemRescueCd_Homepage) or booting into rescue mode from from a CentOS (http://www.centos.org) image are better options for situations like this.

    System Rescue CD is already setup for this sort of situation. OpenSSH is installed, and it starts on boot. Setting a root password or creating a user are all that's needed to get SSH access going.

    CentOS images have a rescue mode hidden in the bootloader. "Troubleshooting > Rescue CentOS System" will boot into a minimal environment. You would need to do a little bit more work to get remote access going, but it's nice being able to work in a similar environment during recovery efforts.

    In the past RedHat kernels have included support for technologies that other didn't, LVM mainly, which made it hard to work on RHEL based systems when using other live distros, and the rescue environment is much more similar to a regular CentOS system then a Debian based system, like Ubuntu.

    Installing a full system on a flash drive is another option for emergencies. Staples has pretty good deals on 32GB+ Lexar flash drives every so often.

  • @MTUser2012 said:
    Thank you. This is really, really helpful. I've found for myself that your concerns are correct, spot on. I am running into two problems, one the Ubuntu LiveCD quickly consumes all the space that it allocates itself on install. 2. After I mount the disk that I need to fix by deleting, moving and renaming files, Ubuntu does not recognize it because it is an LVM file system.

    You can see how little I know. I am not averse to learning more, but I don't think I'll ever be great at anything other than following manuals. Given my skills, do you think the best course of action is the system rescue CD, or do you think the manuals/resources for booting this Centos 6 bricked machine into rescue mode and getting ssh going would be within my abilities?

    You're welcome. I'm glad I could help.

    Like any new skill, I takes time and practice to build up knowledge and experience, and you're doing pretty well. :)

    If you only need to mount a disk and edit some files, I would use SystemRescueCD. It's more full featured, and it's documented better then the rescue mode on CentOS discs. I was using SystemRescueCD just the other day, so I can confirm this works. :)

    Check under "/dev/mapper" for LVM volumes to mount. LVM and software RAID show up under a different part of "/dev" rather then as a "/dev/sd*" entry. The disk is still mountable if it's part of an LVM volume or a software RAID set, but you don't really get anything useful out of it. This may be what you're seeing.

    Thanked by 1MTUser2012
  • I too highly recommend system rescue cd - it has come handy on many occasions to do precisely this kind of disk level changes/fixes (etc.) in a sanitized boot environment when you're messing with your root partitions. It also has the option of loading itself into memory on boot which makes it invaluable if you're also playing in a physical machine where you want to remove/add/hotplug drives (USB or others) without fear of requiring the (system rescue cd) media again.

    On the other hand, if you're mainly interested in partition resizing/formatting, I'd say give gparted a try - easy to use UI that makes resizing etc. a breeze.

    I know that in this particular instance you were more interested in remote admin stuff, but it never hurts to know about options (esp. for self help that is reasonably easy to understand).

    Hope this helps.

Sign In or Register to comment.