Loading

Installing SSH on the Linkstation

To install SSH run though the following

useradd sshd
cd <folder_for_compiling>
wget ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-4.3p2.tar.gz
tar xzvf openssh-4.3p2.tar.gz
cd openssh-4.3p2
./configure –without-zlib-version-check
make
make install

Create the following statup script:

=====

#! /bin/sh
# export USER=”root”
# NAME=ssh

start()
{
    if [ ! -d /var/empty ]; then
        mkdir /var/empty
    fi�
    /usr/local/sbin/sshd
}
stop()
{
    killall sshd
}

case “$1” in
    start)
        echo -n “Starting sshd: ”
        start
        ;;
    stop)
        echo -n “Stopping sshd ”
        stop
        ;;
    restart)
        echo -n “Restarting sshd ”
        stop
        start
        ;;
    *)
        echo “Usage: /etc/init.d/$NAME {start|stop|restart}”
        exit 1
        ;;
esac

exit 0
====

save in /etc/init.d/sshd
chmod +x /etc/init.d/sshd
/etc/init.d/sshd
ln -s /etc/init.d/sshd /etc/rc.d/rc2.d/S07sshd

Leave a Reply

Your email address will not be published. Required fields are marked *