-

Originally Posted by
kl522
Just because there is a script /usr/sbin/sshstart created, it does not make /etc/init.d/ssh less guilty of a bug. /etc/init.d/ssh is meant to be invoked, manually or from boot, for the fact that it is located in /etc/init.d, however less friendly it is.
If you look at the script /etc/init.d/ssh, somewhere line 26,
Code:
if [ -n "$2" ]; then
SSHD_OPTS="$SSHD_OPTS $2"
fi
Now we know '$1' is 'start', 'stop' or 'restart'. It will be everybody's guess what is '$2' supposed to be. But whatever it is, according to this script, it is supposed to accept some kind of SSHD_OPTS but the problem is that it is only accepting single argument, $2, that's why there is an error when invoked as '/etc/init.d/ssh start -p 22' while '/etc/init.d/ssh start "-p 22"' will not have error.
I changed the command that the shortcut runs to:
Code:
/usr/sbin/sshstart "-p 512"
I then ran it, but it's still using port 22:
Code:
knoppix@Microknoppix:~$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 4926/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 3050/cupsd
knoppix@Microknoppix:~$
Is there anyway to change the port?
-Charlie
-
Senior Member
registered user

Originally Posted by
Charlie Foxtrot
I changed the command that the shortcut runs to:
Code:
/usr/sbin/sshstart "-p 512"
I then ran it, but it's still using port 22:
Read my posts again. I have never pitched for /usr/sbin/sshstart. I said /etc/init.d/ssh start "-p 22". Read again please.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX
$59.99

GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5
$189.99

Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery
$54.99

ASUS PRIME Z890-P WIFI Z890 LGA 1851 ATX motherboard, Intel® Core™ Ultra Series
$235.99

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard
$59.99

MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P
$71.49

Asus Prime B660M-A AC D4 Motherboard Intel LGA 1700 14th 13th 12th Gen DDR4
$79.99

ASUS PRIME B360M-C MicroATX Intel LGA1151 DDR4 HDMI VGA USB RJ-45 Audio
$34.99

ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield
$84.99

ASRock IMB-X1314 LGA 1700 Intel W680 DDR4 Quad display Micro-ATX Motherboard
$351.99