Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorials:vps_debian [2012/01/28 20:44] – Bring in improvements from sdf memnontutorials:vps_debian [2012/02/01 13:39] (current) – Import latest addition from sdf memnon
Line 198: Line 198:
 </code> </code>
 This frees up about 23MB.  This frees up about 23MB. 
 +
 +=== portmap ===
 +I don't need portmap, so i removed it completely:
 +
 +  apt-get remove --purge portmap
 +
 +=== openssh vs. dropbear ===
 +If you dont need all the extra features openssh has compared to dropbear, you can reduce memory consumption from 23MB to 5MB while being connected with 1 non-root user to the system by replacing openssh with dropbear.
 +
 +  apt-get install dropbear
 +
 +Edit /etc/defaults/dropbear and set NO_START to 0 and add the extra args "-w -s -g" to disallow root and password logins (You'll be only able to login with a non root user and ssh keys):
 +<code>
 +# disabled because OpenSSH is installed
 +# change to NO_START=0 to enable Dropbear
 +NO_START=0
 +
 +# the TCP port that Dropbear listens on
 +DROPBEAR_PORT=22
 +
 +# any additional arguments for Dropbear
 +DROPBEAR_EXTRA_ARGS="-w -s -g"
 +
 +# specify an optional banner file containing a message to be
 +# sent to clients before they connect, such as "/etc/issue.net"
 +DROPBEAR_BANNER=""
 +
 +# RSA hostkey file (default: /etc/dropbear/dropbear_rsa_host_key)
 +#DROPBEAR_RSAKEY="/etc/dropbear/dropbear_rsa_host_key"
 +
 +# DSS hostkey file (default: /etc/dropbear/dropbear_dss_host_key)
 +#DROPBEAR_DSSKEY="/etc/dropbear/dropbear_dss_host_key"
 +
 +# Receive window size - this is a tradeoff between memory and
 +# network performance
 +DROPBEAR_RECEIVE_WINDOW=65536
 +</code>
 +
 +Afterwards, you can deactivate openssh with
 +
 +  update-rc.d ssh remove
 +
 +or uninstall it: 
 +
 +  apt-get remove openssh-server