Установка openssh на хостинг RU-CENTER

(!) Только для тарифа 301

http://mirror.corbina.net/pub/OpenBSD/OpenSSH/portable/

wget http://mirror.corbina.net/pub/OpenBSD/OpenSSH/portable/openssh-6.1p1.tar.gz

tar -xzvf openssh-6.1p1.tar.gz

./configure --prefix=$HOME/openssh --with-privsep-path=$HOME/openssh/var/empty --with-pid-dir=$HOME/openssh/var/run

make install clean


в файле $HOME/openssh/etc/sshd_config:
UsePrivilegeSeparation no
Port 2222
Pidfile $HOME/openssh/var/run/sshd.pid

в файле $HOME/etc/rc.d/startsshd
#!/bin/sh
#
PIDFILE=$HOME/openssh/var/run/sshd.pid
$HOME/openssh/sbin/sshd
if [ -e $PIDFILE ] ; then
echo "sshd for user $USER started"
else
echo "sshd for user $USER NOT started"
fi

Comments powered by CComment

Designed by san © 2018