[巴法络] [求助] 无法ssh登陆 |
ls-xl,配的希捷2t的硬盘,全新插入未手工设置。
升级官方1.63。 完全根据标准流程进行,破解root密码,更改ssh root登陆,重启ssh后使用securecrt或putty无法登陆: The remote system refused the connection. 请高人不吝赐教,谢谢! 以下是命令行的内容: C:\Users\admin\Downloads> C:\Users\admin\Downloads>java -jar acp_commander.jar -t 192.168.0.198 -ip 192. 168.0.198 -pw password -c "(echo toor;echo toor)|passwd" ACP_commander out of the nas-central.org (linkstationwiki.net) project. Used to send ACP-commands to Buffalo linkstation(R) LS-PRO. WARNING: This is experimental software that might brick your linkstation! Using random connID value = 7B30B8719216 Using target: 192.168.0.198/192.168.0.198 Starting authentication procedure... Sending Discover packet... Found: LS-XL9F9 (/192.168.0.198) LS-XL(SHOUTOKU) (ID=00025) mac: 4C: E6:76:C5:89:F9 Firmware= 1.630 Key=2592E500 Trying to authenticate EnOneCmd... ACP_STATE_OK Trying to authenticate with admin password... ACP_STATE_OK >(echo toor;echo toor)|passwd OK (ACP_STATE_OK) Changeing IP: ACP_STATE_PASSWORD_ERROR Please note, that the current support for the change of the IP is currently very rudimentary. The IP has been set to the given, fixed IP, however DNS and gateway have not bee n set. Use the WebGUI to make appropriate settings. C:\Users\admin\Downloads>java -jar acp_commander.jar -t 192.168.0.198 -ip 192. 168.0.198 -pw password -c "sed -i 's/UsePAM yes/UsePAM no/g' /etc/sshd_config" ACP_commander out of the nas-central.org (linkstationwiki.net) project. Used to send ACP-commands to Buffalo linkstation(R) LS-PRO. WARNING: This is experimental software that might brick your linkstation! Using random connID value = 262F1FCA71F3 Using target: 192.168.0.198/192.168.0.198 Starting authentication procedure... Sending Discover packet... Found: LS-XL9F9 (/192.168.0.198) LS-XL(SHOUTOKU) (ID=00025) mac: 4C: E6:76:C5:89:F9 Firmware= 1.630 Key=717C3846 Trying to authenticate EnOneCmd... ACP_STATE_OK Trying to authenticate with admin password... ACP_STATE_OK >sed -i 's/UsePAM yes/UsePAM no/g' /etc/sshd_config OK (ACP_STATE_OK) Changeing IP: ACP_STATE_PASSWORD_ERROR Please note, that the current support for the change of the IP is currently very rudimentary. The IP has been set to the given, fixed IP, however DNS and gateway have not bee n set. Use the WebGUI to make appropriate settings. C:\Users\admin\Downloads>java -jar acp_commander.jar -t 192.168.0.198 -ip 192. 168.0.198 -pw password -c "sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' / etc/sshd_config" ACP_commander out of the nas-central.org (linkstationwiki.net) project. Used to send ACP-commands to Buffalo linkstation(R) LS-PRO. WARNING: This is experimental software that might brick your linkstation! Using random connID value = 4A647EFFA996 Using target: 192.168.0.198/192.168.0.198 Starting authentication procedure... Sending Discover packet... Found: LS-XL9F9 (/192.168.0.198) LS-XL(SHOUTOKU) (ID=00025) mac: 4C: E6:76:C5:89:F9 Firmware= 1.630 Key=349713D4 Trying to authenticate EnOneCmd... ACP_STATE_OK Trying to authenticate with admin password... ACP_STATE_OK >sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/sshd_config OK (ACP_STATE_OK) Changeing IP: ACP_STATE_PASSWORD_ERROR Please note, that the current support for the change of the IP is currently very rudimentary. The IP has been set to the given, fixed IP, however DNS and gateway have not bee n set. Use the WebGUI to make appropriate settings. C:\Users\admin\Downloads>java -jar acp_commander.jar -t 192.168.0.198 -ip 192. 168.0.198 -pw password -c "/etc/init.d/sshd.sh restart" ACP_commander out of the nas-central.org (linkstationwiki.net) project. Used to send ACP-commands to Buffalo linkstation(R) LS-PRO. WARNING: This is experimental software that might brick your linkstation! Using random connID value = 4B9E0E730008 Using target: 192.168.0.198/192.168.0.198 Starting authentication procedure... Sending Discover packet... Found: LS-XL9F9 (/192.168.0.198) LS-XL(SHOUTOKU) (ID=00025) mac: 4C: E6:76:C5:89:F9 Firmware= 1.630 Key=76000812 Trying to authenticate EnOneCmd... ACP_STATE_OK Trying to authenticate with admin password... ACP_STATE_OK >/etc/init.d/sshd.sh restart OK (ACP_STATE_OK) Changeing IP: ACP_STATE_PASSWORD_ERROR Please note, that the current support for the change of the IP is currently very rudimentary. The IP has been set to the given, fixed IP, however DNS and gateway have not bee n set. Use the WebGUI to make appropriate settings. C:\Users\admin\Downloads> |
本帖最后由 wahhh 于 2013-2-18 15:56 编辑
LS-XL需要再修改/etc/init.d/sshd.sh,删掉15到19行(对SFTP的判断),否则sshd服务起不来。具体是这么几句: if [ "${SUPPORT_SFTP}" = "0" ] ; then echo "Not support sftp on this model." > /dev/console exit 0 fi 稳妥的步骤是: 1. 先把文件拷到samba共享目录(IP根据实际修改): java -jar acp_commander.jar -t 192.168.0.10 -ip 192.168.0.10 -pw adminpasswordhere -c "cp /etc/init.d/sshd.sh /mnt/disk1/share/" 2. WINDOWS中打开NAS的共享目录,用ultraedit打开sshd.sh文件,看看15到19行是不是检查是否支持SFTP的语句,是的话删除,然后按unix格式保存。为防止出错,还可以把原文件备份一下。 3. 把修改后的文件拷回去: java -jar acp_commander.jar -t 192.168.0.10 -ip 192.168.0.10 -pw adminpasswordhere -c "cp /mnt/disk1/share/sshd.sh /etc/init.d/" 4. 在web界面重启NAS |
我按楼上高手的命令执行后文件不能拷贝,为什么呢:
ACP_commander out of the nas-central.org (linkstationwiki.net) project. Used to send ACP-commands to Buffalo linkstation(R) LS-PRO. WARNING: This is experimental software that might brick your linkstation! Using random connID value = C8331ABE179E Using target: 192.168.0.15/192.168.0.15 Starting authentication procedure... Sending Discover packet... A SocketTimeoutException usually indicates bad firewall settings. Check especially for *UDP* port 22936 and make sure that the connection to your LS is working. ERROR: Exception: SocketTimeoutException (Receive timed out) [ACP Send/Receive (Packet:8020 = ACP_Discover)] |
|
yh13787021347 发表于 2013-5-10 14:26 我的wvl 1.64官方固件 也是按照流程自己root 但是一直ssh不了 防火墙什么都关了啊 一直没有解决。。。你是怎么解决的呢? |
感谢分享。
LS-421DE更新固件到1.3,根据标准流程进行,破解root密码,更改ssh root登陆,重启ssh后使用securecrt无法登陆,用楼主的方法成功!!!! ![]() |