итак: ссш это почти тоже самое что и телнет только защищенное (заходить через патти только при создании профиля нужно выбрать ссш, для которого стандартный порт - 22)
изменяем PATH:
редактируем файл /mnt/HD_a2/ffp/etc/profile
находим строки:
Код:
# Set the default system $PATH:
PATH=/ffp/bin:/usr/bin:/bin
if ....
и изменяем так:
Код:
PATH=/opt/bin:/opt/sbin:/ffp/bin:/usr/bin:/bin
выполняем
Код:
chmod 0755 /mnt/HD_a2/ffp/etc/profile
добавление маунт:редактируем файл /mnt/HD_a2/fun_plug
в самый конец файла пишем:
Код:
mkdir -p /opt
mount --bind /mnt/HD_a2/ipkg/opt /opt
Как установить ССШ:подготовка (нужно будет придумать пароль для рута):
Код:
echo "root::0:0:99999:7:::" >>/etc/shadow
passwd root
chsh -s /ffp/bin/sh root
/ffp/sbin/store-passwd.sh
OpenSSH Secure Shell Server
To start openssh, just run:
Код:
sh /ffp/start/sshd.sh start
On the first start, it will create the essential key files (may take a minute or two).
SSH sessions will start into the shell configured for the user in /etc/passwd. This defaults to the firmware's busybox shell /bin/sh (enter 5784468 to get a shell prompt).
As root, you can manually change the login shell for user bob:
Код:
chsh -s /ffp/bin/bash bob
If you receive
Цитата:
WARNING: Your password has expired. You must change your password now and login again!
messages on login, try if running 'pwconv' (as root) fixes it. See also:
http://forum.dsmg600.info/p13142-2008-04-08-12%3A59%3A43.html#p13142To make your changes permanent, you can store the updated passwd and shadow files to flash memory (TEST YOUR CHANGES BEFORE DOING THIS!!):
Код:
/ffp/sbin/store-passwd.sh
To set sshd to run at startup: (TEST YOUR CHANGES BEFORE TURNING OFF telnetd):
Код:
chmod a+x /mnt/HD_a2/ffp/start/sshd.sh
To turn off telnetd: (TEST YOUR CHANGES BEFORE TURNING OFF telnetd):
Код:
chmod a-x /mnt/HD_a2/ffp/start/telnetd.sh
Alternatively, you can store your modified passwd and shadow files in /ffp/etc/ and copy them to /etc on every startup. There's not start script included for this, yet.
правим файл /mnt/HD_a2/ffp/etc/ssh/sshd_config
добавляем где-нить вверху
Код:
AllowUsers имя_вашего_пользователя
проверяем все несколько раз и перезагружаем девайс