оказывается, если добавлять что-то в /etc/shells, надо сперва добавить туда /bin/sh, а не то перестает работать ssh
Пока не нашел, как привязать ключ к юзеру. (под админом я нормально логинюсь с помощью ключа)
http://www.nslu2-linux.org/wiki/HowT...orRemoteAccess
someone@hostname заменил на portforwarderOnce we have this we want to save our public key into the authorized keys file which can be done easily as follows (The key here has been shortened for display purposes. Your generated key will be a much longer string):
# echo ssh-rsa AAAAB3NzaC1yc2EAAAABIwAA......aJ3Wy+Ws4IZEgdJgPlTY UBWWtCWOGc= someone@hostname > authorized_keys
не работает.
гениально
Добрый день. Помогите пожалуйста чайнику. Решил настроить ssh. Настраивал по инструкции:
http://wl500g.info/showthread.php?t=...0%ED%E8%E5+SSH
в /usr/local/sbin/post-boot прописано следующее:
dropbear -p 16016
в /usr/local/sbin/post-firewall
# set default policy
iptables -P INPUT DROP
# remove last default rule
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --syn --dport 16016 -j ACCEPT
в процессах dropbear висит:
-sh: 59: not found
[fuzzylogic@pela root]$ 64 fuzzylog 380 S httpd vlan1
-sh: 64: not found
[fuzzylogic@pela root]$ 69 fuzzylog 408 S syslogd -m 0 -O /tmp/syslog.log -S -l 7
-sh: 69: not found
[fuzzylogic@pela root]$ 70 fuzzylog 364 S klogd
-sh: 70: not found
[fuzzylogic@pela root]$ 75 nobody 432 S [dnsmasq]
-sh: 75: not found
[fuzzylogic@pela root]$ 77 fuzzylog SW [khubd]
-sh: 77: not found
[fuzzylogic@pela root]$ 85 fuzzylog 276 S lpd
-sh: 85: not found
[fuzzylogic@pela root]$ 87 fuzzylog 260 S p9100d -f /dev/usb/lp0 0
-sh: 87: not found
[fuzzylogic@pela root]$ 90 fuzzylog 340 S waveservermain
-sh: 90: not found
[fuzzylogic@pela root]$ 92 fuzzylog 344 S rcamdmain
-sh: 92: not found
[fuzzylogic@pela root]$ 105 fuzzylog 312 S infosvr br0
-sh: 105: not found
[fuzzylogic@pela root]$ 106 fuzzylog 448 S watchdog
-sh: 106: not found
[fuzzylogic@pela root]$ 109 fuzzylog 344 S ntp
-sh: 109: not found
[fuzzylogic@pela root]$ 116 fuzzylog 480 S dropbear -p 16016
-sh: 116: not found
[fuzzylogic@pela root]$ 121 fuzzylog 492 S upnp -D -L br0 -W vlan1
-sh: 121: not found
[fuzzylogic@pela root]$ 125 fuzzylog 728 S dropbear -p 16016
-sh: 125: not found
[fuzzylogic@pela root]$ 126 fuzzylog 548 S -sh
-sh: 126: not found
[fuzzylogic@pela root]$ 130 fuzzylog 728 S dropbear -p 16016
-sh: 130: not found
[fuzzylogic@pela root]$ 131 fuzzylog 548 S -sh
-sh: 131: not found
[fuzzylogic@pela root]$ 134 fuzzylog 392 R ps
Putty c машины из внутренней сети заходит. Проблемы начинаются при удаленном доступе.
В логах iptables порт 16016 не открыт:
Chain INPUT (policy ACCEPT)
target prot opt source destination
MACS all -- anywhere anywhere
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere state NEW
ACCEPT all -- anywhere anywhere state NEW
SECURITY all -- anywhere anywhere state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
MACS all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP all -- anywhere anywhere
SECURITY all -- anywhere anywhere state NEW
ACCEPT all -- anywhere anywhere ctstate DNAT
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain MACS (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere MAC 00:1E:8C:9A:1D:C4
RETURN all -- anywhere anywhere MAC 00:19:CB:41:72:BC
RETURN all -- anywhere anywhere MAC 00:19:CB:41:72:B9
RETURN all -- anywhere anywhere MAC 00:19:CB:41:72:B8
RETURN all -- anywhere anywhere MAC 00:1E:8C:9A:1C:3A
DROP all -- anywhere anywhere
Chain SECURITY (2 references)
target prot opt source destination
RETURN tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN limit: avg 1/sec burst 5
RETURN tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/RST limit: avg 1/sec burst 5
RETURN udp -- anywhere anywhere limit: avg 5/sec burst 5
RETURN icmp -- anywhere anywhere limit: avg 5/sec burst 5
DROP all -- anywhere anywhere
Chain logaccept (0 references)
target prot opt source destination
LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `ACCEPT '
ACCEPT all -- anywhere anywhere
Chain logdrop (0 references)
target prot opt source destination
LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `DROP '
DROP all -- anywhere anywhere
если добавляю руками - в iptables прописывается:
Как сделать чтобы это происходило автоматом?
Файл /usr/local/sbin/post-firewall отрабатывает?
Полное содержимое файла можно?
Было: WL500gP (fw 1.9.2.7-10-USB-1.71) + Toshiba TravelStar 250Gb 2.5" inside router.
(ADOS + rTorrent WebUI+rtorrent + samba + rrdtool + XMail + QuiXplorer + ClamAV)
> Мои инструкции < Для новичков и ленивых > Wiki переехало сюда < "Ночные" сборки >
Не отработал post-firewall
Возможно, из-за того, что на него не сказали chmod +x
Возможно, из-за того, что нет в начале магической строчки
И оставлять файрвол без "DROP все остальное" некрасиво.Code:#!/bin/sh
Надо добавить в конце
upd. А, там дефолтная политика ставится. Тогда последнее не обязательно.Code:iptables -A INPUT -j DROP
Было: WL500gP (fw 1.9.2.7-10-USB-1.71) + Toshiba TravelStar 250Gb 2.5" inside router.
(ADOS + rTorrent WebUI+rtorrent + samba + rrdtool + XMail + QuiXplorer + ClamAV)
> Мои инструкции < Для новичков и ленивых > Wiki переехало сюда < "Ночные" сборки >
Раз уж зашла тема о SSH,-
Такой глюк(?) при смене пароля через web конфигуратор пароль на SSH не меняется что с этим делать и как лечить?
P.S. подозреваю что это может быть из за того что система грузится с флешки ... вобщем теряюсь в догадках спасайте
WL500gP v1 (Oleg's fw 1.9.2.7-10) + USB Hub +Sony USB Flash 2Gb aka flashfs + USB Flash 128 aka swap + HDD Seagate FreeAgent 250Gb (rTorrent WebUI), все сделано с помощью инструкций
Vbifi а что passwd уже не спасает? Я сделал его и монументальные flashfs save и тд.