Howdy, Stranger!

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

Advertise on LowEndTalk.com

Latest LowEndBox Offers

    How to replace dropbear with openssh?
    New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

    How to replace dropbear with openssh?

    AsimAsim Member
    edited July 2011 in Help

    OK, I got a VPS from a provider, its a small vps with limited memory and it came preinstalled with dropbear (in the template). Was just wondering how to replace dropbear with regular openssh? because there is no history on up-key etc

    Any help?

    Comments

    • fanfan Member
      edited July 2011

      I think simply remove dropbear and install openssh will work fine, unless the os template itself is broken. (Just posted the wrong response. :)

    • AsimAsim Member

      Removed dropbear

      # apt-get remove --purge dropbear
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      Package dropbear is not installed, so not removed
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

      OpenSSH is already installed

      # apt-get install openssh-server
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      openssh-server is already the newest version.
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

      ps aufx returns

      # ps aufx
      USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
      root         1  0.0  0.7   1984   724 ?        Ss   14:37   0:00 init [2]
      root      1407  0.0  1.2   3252  1192 ?        Ss   14:37   0:00 /usr/sbin/syslog-ng -p /var/run/syslog-ng.pid
      snmp      1439  0.0  4.4   8988  4332 ?        S    14:37   0:01 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf
      root      1445  0.0  0.9   3656   956 ?        S    14:37   0:00 /usr/sbin/vsftpd
      root      1468  0.0  0.8   2040   864 ?        Ss   14:37   0:00 /usr/sbin/cron
      root      3089  0.0  0.9   2356   892 ?        Ss   16:03   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
      root      3182  0.0  1.8   5488  1820 ?        Ss   16:03   0:00 /usr/lib/postfix/master
      postfix   3188  0.0  1.7   5544  1760 ?        S    16:03   0:00  \_ qmgr -l -t fifo -u
      postfix   5521  0.0  1.7   5500  1720 ?        S    17:43   0:00  \_ pickup -l -t fifo -u -c
      root      3254 12.1  1.1   2464  1144 ?        Ss   16:05  16:41 /usr/sbin/dropbear -d /etc/dropbear/dropbear_dss_host_key -r /etc/dropbear/dropbear_rsa_host_key -p 22 -W 65536
      root      3255  0.0  0.5   1804   536 ?        S    16:05   0:00  \_ pdksh -c rsync --server -vlogDtprze.iLsf --delete . /home/
      root      3256  0.0  0.9   3548   948 ?        S    16:05   0:00      \_ rsync --server -vlogDtprze.iLsf --delete . /home/
      root      3257  3.0  0.9   3836   928 ?        R    16:05   4:09          \_ rsync --server -vlogDtprze.iLsf --delete . /home/
      root      3370  0.0  1.1   2476  1164 ?        Ss   17:08   0:00 /usr/sbin/dropbear -d /etc/dropbear/dropbear_dss_host_key -r /etc/dropbear/dropbear_rsa_host_key -p 22 -W 65536
      root      3371  0.0  0.6   1804   608 pts/0    Rs   17:08   0:00  \_ -pdksh
      root      6113  0.0  0.8   2296   856 pts/0    R+   18:22   0:00      \_ ps aufx
      nagios    3460  0.0  0.9   3616   896 ?        Ss   17:13   0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
      daemon    3968  0.0  0.5   1768   508 ?        Ss   17:28   0:00 /sbin/portmap
      root      3999  0.0  0.5   3272   568 ?        Ss   17:28   0:00 /usr/sbin/famd -T 0
      www-data  5369  0.0  1.7   5848  1732 ?        S    17:38   0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
      www-data  5370  0.0  5.1  17100  5020 ?        Ss   17:38   0:00  \_ /usr/bin/php-cgi
      www-data  5374  0.0  2.8  17100  2764 ?        S    17:38   0:00  |   \_ /usr/bin/php-cgi
      www-data  5375  0.0  2.8  17100  2756 ?        S    17:38   0:00  |   \_ /usr/bin/php-cgi
      www-data  5376  0.0  1.9  17100  1924 ?        S    17:38   0:00  |   \_ /usr/bin/php-cgi
      www-data  5377  0.0  1.9  17100  1924 ?        S    17:38   0:00  |   \_ /usr/bin/php-cgi
      www-data  5378  0.0  5.1  17100  5016 ?        Ss   17:38   0:00  \_ /usr/bin/php-cgi
      www-data  5379  0.0  3.6  17100  3576 ?        S    17:38   0:00      \_ /usr/bin/php-cgi
      www-data  5380  0.0  2.8  17100  2760 ?        S    17:38   0:00      \_ /usr/bin/php-cgi
      www-data  5381  0.0  2.7  17100  2752 ?        S    17:38   0:00      \_ /usr/bin/php-cgi
      www-data  5382  0.0  3.6  17100  3552 ?        S    17:38   0:00      \_ /usr/bin/php-cgi

      so, any help?

    • fanfan Member

      Try kill dropbear processes and /etc/init.d/ssh start.

    • AsimAsim Member

      Somehow, after reboot everything is working fine with openssh-server running :)
      Thanks for your help

    • miTgiBmiTgiB Member

      Why run nrpe and snmpd? Seems very redundant when nrpe has a smaller footprint and can gather everything snmpd can. Also, 8 php threads? Really? And postfix as a daemon? You can tune that quite a bit better then that ;)

      Hostigation High Resource Hosting - SolusVM KVM VPS / Proxmox OpenVZ VPS- Low Cost Comodo SSL Certificates
    • drmikedrmike Member

      OK, I'll ask. How do you do all that while logged into the VPS via dropbear?

    • miTgiBmiTgiB Member
      edited July 2011

      dropbear is a replacement for openssh, so I am not fully understanding what you are asking

      Hostigation High Resource Hosting - SolusVM KVM VPS / Proxmox OpenVZ VPS- Low Cost Comodo SSL Certificates
    • KuJoeKuJoe Member, Provider

      Just because you uninstall something doesn't stop it from running. I've uninstalled Cherokee before but it kept serving webpages until I rebooted the server.

      -Joe @ SecureDragon - LEB's Powered by Wyvern in FL, CO, CA, IL, NJ, GA, OR, TX, and AZ
      Need backup space? Check out BackupDragon
    • fanfan Member

      @miTgiB Dropbear is lightweight but it has many limitations, for example, tunneling traffic in the painful ssh -D way has much better performance with Openssh.

    • AsimAsim Member

      @miTgiB well, I am not a pro linux user so just a few things I read over the internet and putting them all in one box. nrpe is for Nagios and snmpd is for cacti monitoring

      @drmike How do I do what? installing and removing software? well dropbear can do everything that openssh can do but I am not too comfortable with it hence want to switch back to openssh

      @KuJoe yes exactly. I noticed this with sendmail and dropbear, you have to either reboot or kill those processes (and hope it works) :D

      @fan I hate dropbear because of no history-on-up-arrow-key (which I am really used to) + a few more things that makes it difficult to work with dropbear

    • @Asim -- wouldn't history be handled by the shell rather than your SSH client? It certainly works for me :)

      But @fan is right -- dropbear's performance is quite bad, when you use a lot of SFTP or tunnelling. Most my hosts actually run OpenSSH unless it's really short of memory. 512MB OpenVZ boxes under $4/month these days, it has been rare...

      Blog at LowEndBox.com.

    • @fan -- thanks.

      Blog at LowEndBox.com.

    • Thanks for all the information! I might replace Dropbear with SSH :o

      Thanked by 1ollietrex
    • rds100rds100 Member

      @Asim Since you said this is small memory VPS - do you really need the portmap? Consider apt-get remove --purge portmap

      Thanked by 1Asim

      -

    Sign In or Register to comment.