~ # ~ # diff /etc/ssh/sshd_config /root/root_sshd_config --- /etc/ssh/sshd_config +++ /root/root_sshd_config @@ -2,7 +2,7 @@ # See the sshd(8) manpage for details # What ports, IPs and protocols we listen for -Port 22 +Port 12345 # Use these options to restrict which interfaces/protocols sshd will bind to AddressFamily inet #ListenAddress :: @@ -12,7 +12,7 @@ HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key #Privilege Separation is turned on for security -UsePrivilegeSeparation yes +UsePrivilegeSeparation no # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 @@ -24,7 +24,7 @@ # Authentication: LoginGraceTime 120 -PermitRootLogin no +PermitRootLogin yes StrictModes yes RSAAuthentication yes @@ -73,7 +73,7 @@ # Allow client to pass locale environment variables AcceptEnv LANG LC_* -Subsystem sftp /usr/lib/openssh/sftp-server +#Subsystem sftp /usr/lib/openssh/sftp-server AllowUsers *@127.0.0.1 *@10.0.0.0/8 *@172.16.0.0/12 *@192.168.0.0/16 ~ # ~ #
sshd_start() { modprobe g_ether sleep 1 /sbin/ifconfig usb0 192.168.2.15 up if [ ! -d /dev/pts ] ; then mkdir /dev/pts fi mount -t devpts devpts -o gid=5,mode=620 /dev/pts /usr/sbin/sshd -f /root/root_sshd_config text2screen -c -B 0x000000 text2screen -t "Running SSHD on USB" -s 3 -H center -V center while [ "1" -le "2" ] do sleep 1 done }
sshd_query() { modprobe twl4030_keypad mknod /tmp/keypadi c 13 68 text2screen -c -B 0x000000 text2screen -t "Press UP for ssh shell" -s 3 -H center -V center iii=49 iLIMIT=1 iyy=470 while [ "$iLIMIT" -le $iii ] do let "iii-=1" let "iyy=iyy-10" text2screen -t " " -s 1 -x 840 -y $iyy -T 0xffffff -B 0xffffff iss=$(/bin/evkey -t 200 -d /tmp/keypadi) if [ "x$iss" == "x115" ]; then text2screen -c -B 0x000000 text2screen -t "Going to start SSHD" -s 3 -H center -V center sleep 2 sshd_start break fi if [ "x$iss" == "x114" ]; then text2screen -c -B 0x000000 text2screen -t "Booting next stage" -s 3 -H center -V center sleep 2 boot break fi done if [ "x$iii" == "x0" ]; then text2screen -c -B 0x000000 text2screen -t "Defaulting to booting next stage" -s 3 -H center -V center sleep 2 boot fi }