Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Thu Nov 23, 2017 8:16 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Wed Feb 15, 2017 8:45 pm 
Offline
Newbie

Joined: Wed Feb 15, 2017 7:26 pm
Posts: 5
Hi guys,

I'm not 100% sure this is the correct forum for the LS-XL, my apologies if it's not.

I have been trying for a while now to get permanent SSH access on my LS-XL. I can get temp access using ACP Commander but cannot find a way to get SSHD to load at startup. All my changes just get wiped after a reboot. Is there anywhere I can place my 'sshd -f' line to auto start my config?

Is there an image that is written at boot that I can extract to add my code in with the temp SSH access?

Or if it's easier, all I really need is the ability to shutdown the LS-XL via a Linux box connected to a UPS. A script is called when the UPS is low and shuts down my other servers. Maybe there is a curl call or something I can use to just shut the system down cleanly from a script?

Thanks.


Top
   
PostPosted: Wed Feb 15, 2017 9:18 pm 
Online
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2691
Code:
java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw adminpassword -c "(echo newrootpass;echo newrootpass)|passwd"
java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw adminpassword -c "sed -i 's/UsePAM yes/UsePAM no/g' /etc/sshd_config"
java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw adminpassword -c "sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/sshd_config"
java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw adminpassword -c "sed -i '15,19d' /etc/init.d/sshd.sh"
java -jar acp_commander.jar -t NAS_IP -ip NAS_IP -pw adminpassword -c "/etc/init.d/sshd.sh restart"


from
http://forum.nas-hilfe.de/buffalo-technology-nas-anleitungen/fw-1-56-offen-ssh-auf-eine-ls-chlv2-fw-1-56-t1220.html


Top
   
PostPosted: Wed Feb 15, 2017 9:58 pm 
Offline
Newbie

Joined: Wed Feb 15, 2017 7:26 pm
Posts: 5
That doesn't seem to have worked. After entering the commands, there is no SSH open, I even tried rebooting.

This is the output from CMD:

Code:
C:\>java -jar acp_commander.jar -t 192.168.10.7 -ip 192.168.10.7 -pw <myPass> -c "(echo <myPass>;echo <myPass>)|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 = B82FA2263FBB
Using target:   LS-XL64F/192.168.10.7
Starting authentication procedure...
Sending Discover packet...
Found:  LS-XL64F (/192.168.10.7)        LS-XL(SHOUTOKU) (ID=00025)      mac: B0:C7:45:67:56:4F  Firmware=  1.710        Key=047CB541
Trying to authenticate EnOneCmd...      ACP_STATE_OK
Trying to authenticate with admin password...   ACP_STATE_OK
>(echo <myPass>;echo <myPass>)|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 been set. Use the WebGUI to make appropriate settings.

C:\>java -jar acp_commander.jar -t 192.168.10.7 -ip 192.168.10.7 -pw <myPass> -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 = 1840825FEBC9
Using target:   LS-XL64F/192.168.10.7
Starting authentication procedure...
Sending Discover packet...
Found:  LS-XL64F (/192.168.10.7)        LS-XL(SHOUTOKU) (ID=00025)      mac: B0:C7:45:67:56:4F  Firmware=  1.710        Key=7E85D532
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 been set. Use the WebGUI to make appropriate settings.

C:\>java -jar acp_commander.jar -t 192.168.10.7 -ip 192.168.10.7 -pw <myPass> -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 = BC2207982B8A
Using target:   LS-XL64F/192.168.10.7
Starting authentication procedure...
Sending Discover packet...
Found:  LS-XL64F (/192.168.10.7)        LS-XL(SHOUTOKU) (ID=00025)      mac: B0:C7:45:67:56:4F  Firmware=  1.710        Key=5C3F15A9
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 been set. Use the WebGUI to make appropriate settings.

C:\>java -jar acp_commander.jar -t 192.168.10.7 -ip 192.168.10.7 -pw <myPass> -c "sed -i '15,19d' /etc/init.d/sshd.sh"
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 = B69E92ABFFAE
Using target:   LS-XL64F/192.168.10.7
Starting authentication procedure...
Sending Discover packet...
Found:  LS-XL64F (/192.168.10.7)        LS-XL(SHOUTOKU) (ID=00025)      mac: B0:C7:45:67:56:4F  Firmware=  1.710        Key=70A3569E
Trying to authenticate EnOneCmd...      ACP_STATE_OK
Trying to authenticate with admin password...   ACP_STATE_OK
>sed -i '15,19d' /etc/init.d/sshd.sh
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 been set. Use the WebGUI to make appropriate settings.

C:\>java -jar acp_commander.jar -t 192.168.10.7 -ip 192.168.10.7 -pw <myPass> -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 = 85E6822A5E67
Using target:   LS-XL64F/192.168.10.7
Starting authentication procedure...
Sending Discover packet...
Found:  LS-XL64F (/192.168.10.7)        LS-XL(SHOUTOKU) (ID=00025)      mac: B0:C7:45:67:56:4F  Firmware=  1.710        Key=69ACA8E6
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 been set. Use the WebGUI to make appropriate settings.


Top
   
PostPosted: Wed Feb 15, 2017 10:02 pm 
Online
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2691
Retry the last command.

There must be an answer.


Top
   
PostPosted: Wed Feb 15, 2017 10:09 pm 
Offline
Newbie

Joined: Wed Feb 15, 2017 7:26 pm
Posts: 5
I tried to do the last command again and I get the same output.

Code:
C:\>java -jar acp_commander.jar -t 192.168.10.7 -ip 192.168.10.7 -pw <myPass> -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 = 75859510746E
Using target:   LS-XL64F/192.168.10.7
Starting authentication procedure...
Sending Discover packet...
Found:  LS-XL64F (/192.168.10.7)        LS-XL(SHOUTOKU) (ID=00025)      mac: B0:C7:45:67:56:4F  Firmware=  1.710        Key=3664953E
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 been set. Use the WebGUI to make appropriate settings.

C:\>


I have disabled the firewall, it did error out with that enabled.


Top
   
PostPosted: Wed Feb 15, 2017 10:44 pm 
Offline
Newbie

Joined: Wed Feb 15, 2017 7:26 pm
Posts: 5
If I enable SSH the temp way and run the last line I see an error:

Code:
/etc/init.d/sshd.sh restart
/etc/init.d/sshd.sh: line 9: t: command not found


Top
   
PostPosted: Wed Feb 15, 2017 11:26 pm 
Offline
Newbie

Joined: Wed Feb 15, 2017 7:26 pm
Posts: 5
OK, so I solved it.

Thanks for those commands they helped point me in the right direction. The problem was my /etc/init.d/sshd.sh file was there but did not have the correct contents (only about 20 lines). I downloaded a sample sshd.sh and ran the '/etc/init.d/sshd.sh restart' command and it then generated the keys and SSH was running. I rebooted and it stayed this time.

Thanks a lot, I appreciate it.


Top
   
PostPosted: Thu Feb 16, 2017 8:41 am 
Online
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2691
Ok, my howto is only working with an unmodified sshd.sh


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited