-

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

Genuine Cisco SFP-10G-SR 0-2415-03 10 Gigabit Transceiver
$5.40

NEW Sealed Cisco SFP-10G-LR 10GBASE-LR SFP+ 1310nm 10km *US Shipping*
$24.00

Cisco Acacia DP04QSDD-E25-840 400G QSFP-DD Coherent DCO Transceiver Module
$699.99

Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch
$129.99

SFP TO RJ45 TRANSCEIVER SFP MODULE COPPER SFP OPTICAL PORT TO RJ45 ETHERNET PORT
$7.99

Intel X520-DA2 10Gb 10Gbe 10 Gigabit Network Adapter NIC Dual Port E10G42BTDA
$28.94

HP 560SFP+ 10GB 2-port PCIe NIC Ethernet ADAPTER 669279-001 w/ (2) 10GB SFP+
$16.99

Cisco SFP-10G-SR V03 850nm 10GBASE-SR SFP+ MMF 10-2415-03 Transceiver
$4.99

Arista SFP-10G-SR 10GBASE-SR XVR-10001-20 850nm SFP+ Optical Transceiver
$20.70

Dell 10 Gigabit SFP+ SR Transceiver 0XYD50 NEW SEALED
$24.99