← Back to team overview

freenx-team team mailing list archive

Re: freenx-server installation and sshd port

 

Actually SSHD_PORT is detected at run-time by nxloadconfig:

if [ -r "/etc/ssh/sshd_config" ]
then
        SSHD_PORT=`grep "Port " -m 1 /etc/ssh/sshd_config | sed "s/Port //"
2>/dev/null`
        [ -z $(echo "$SSHD_PORT" | egrep "^[1-9][0-9]{0,4}$") ] &&
SSHD_PORT=22
else
        SSHD_PORT=22
fi

If you have a "#Port" line before the real port the script will fail.
On the next upload I will change the detection part to:
SSHD_PORT=$(grep "^ *Port " -m 1 /etc/ssh/sshd_config | awk '{ print $2 ;}')

See if this detection method works for you.

Regads.

On Sat, Mar 28, 2009 at 9:09 AM, giannis <ogiannhs@xxxxxxxxx> wrote:

> I have installed freenx-server and since I do not have sshd on the default
> I have to manually change the port for freenx, so I created a script to do
> it automatically. You could use it in the default installation of
> freenx-server:
>
> SSHD_PORT=$(grep Port /etc/ssh/sshd_config  | grep -v "^#" | awk '{ print
> $2 ;}')
>   if [ -n "$SSHD_PORT" ]; then
>     exists=$(grep "^SSHD_PORT=$SSHD_PORT" /etc/nxserver/node.conf )
>     if [ ! -n "$exists" ]; then
>       echo SSHD_PORT=$SSHD_PORT >> /etc/nxserver/node.conf
>     fi
>   fi
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~freenx-team<https://launchpad.net/%7Efreenx-team>
> Post to     : freenx-team@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~freenx-team<https://launchpad.net/%7Efreenx-team>
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References