LS-Series 1.34 +ssh

blacksea

Member
http://buffalo.jp/download/driver/hd/ls_fw.html
link trên để lấy FW
em lưởi dịch các cụ thông cảm,mà toàn các lệnh không ah nhìn cũng biết
Hi all, my first post here, hope it helps.

Enabling ssh login - Tested in FW 1.34 and 1.37
Assuming that your NAS IP is static 192.168.0.10

Using only acp_commander:
First you can test if your nas will accept the following comands, just do a "ls /" and see the result. If you see your "/" folders, its ok:
java -jar acp_commander.jar -t 192.168.0.10 -ip 192.168.0.10 -pw adminpasswordhere -c "ls /"

change root password:
java -jar acp_commander.jar -t 192.168.0.10 -ip 192.168.0.10 -pw adminpasswordhere -c "(echo newrootpass;echo newrootpass)|passwd"


allow root to login on ssh - (this is one way to do it, the other way i know is to remove root from /etc/ftpusers)
java -jar acp_commander.jar -t 192.168.0.10 -ip 192.168.0.10 -pw adminpasswordhere -c "sed -i 's/UsePAM yes/UsePAM no/g' /etc/sshd_config"


Only for fw 1.37 - execute this additional command to enable root login on ssh
java -jar acp_commander.jar -t 192.168.0.10 -ip 192.168.0.10 -pw adminpasswordhere -c "sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/sshd_config"


restart ssh service
java -jar acp_commander -t 192.168.0.10 -ip 192.168.0.10 -pw adminpasswordhere -c "/etc/init.d/sshd.sh restart"


try root login on ssh :)

Ps: my XHL had ssh service enabled after 1.34 and 1.37 updates, didn't tested before (updated from 1.20 to 1.34 / 1.20 to 1.37)
Hix đánh nhầm FW 1.37 các cụ nhé không phải 1.34
 
Bên trên