Buffalo Forums

Product Feature Requests => Feature Requests for TeraStation or LinkStation => : Gogoli August 18, 2020, 01:45:16 AM

: SSH Access
: Gogoli August 18, 2020, 01:45:16 AM

I have a LinkSation 520D(Firmware version 4.50) and I was able to root access through ssh

I see the system files are read only and I can't do anything in it....cant install ipkg,cant install packages like text editors,can't create directories...ect

My question is how to install at least an text editor so after I will be able to edit an transmission web torrent file to be able to change the password because is empty...

: Re: SSH Access
: 1000001101000 August 18, 2020, 08:31:46 AM
The main operating system on this model is stored in a read-only filesystem contained in the device's on-board NAND flash which is why you're unable to make changes to it. The drives/raid arrays get mounted under /home, you can create directories and files there but by default they are mounted with the "noexec" option which prevents you from running code there.

There are a few different ways to work around these limitations, I've put together a short guide for running a full Debian install from a USB drive (alongside the stock firmware):

If you ever need a text editor on a Unix/Linux system (even something like a router) you'll find VI is installed basically everywhere.

: Re: SSH Access
: Gogoli August 18, 2020, 11:51:24 AM
As you can see in the photo there isn't any editor installed!Maybe this is done on purpose for people to not be able to edit files

https://imgur.com/a/PBxeGfR (https://imgur.com/a/PBxeGfR)

If I install full debian I will lose all configuration like samba,ftp ect

I don't get why there is be such a closed system....how I set a password for the trassmision web client witch has an empty password by default...this is crazy
: Re: SSH Access
: 1000001101000 August 18, 2020, 12:46:44 PM
This type of Debian install doesn't actually replace anything, it just runs in the background. This also means you need to do somethings to be able to access your files from it. I can elaborate on that part more if you decide to give it a try.

To open vi use the following command:
Part of why it works this way is to make it easier to use. By putting the OS in flash you can just insert drives and start using the system without having to go through a firmware install etc. There are also security advantages to doing things this way, the same things stopping you from running custom code stop random malware from running as well.

I agree with you though, I wish by default they (not just Buffalo) made devices easier to customize.
: Re: SSH Access
: Gogoli August 18, 2020, 02:59:32 PM
I tried the vi command but not working
I get "-bash: vi: command not found"

https://imgur.com/a/qaC3z9R (https://imgur.com/a/qaC3z9R)

I can give you root details if you want to check

If I install the debian you are talking will I have the same web interface?

: Re: SSH Access
: 1000001101000 August 18, 2020, 03:46:06 PM
I'm surprised vi isn't there.

Maybe this will help make things more clear:

The instructions I linked earlier describe how to install a compatible version of Debian on a USB drive which you can then connect to the device and run inside a chroot environment (see above). This way you don't need to make any real changes to the device's firmware but can run whatever programs you want.

Once you had that running you can install whatever editor you want to use.

: Re: SSH Access
: Gogoli August 18, 2020, 04:01:36 PM
They are doing everything for the system to not be customisable lol

Anyway the option you are talking seems to complicated for me and needs a lot of work as I have to first make a linux vm

I would pay something to you or someone else could do it over TV

I spent a lot of time to get root access and when I found out that was one line of code I was very angry lol

I have LS520D and is running 7.8 debian on latest firmware 4.50 .... *removed to not be leaked as might be fixed in a newer release of the firmware
: Re: SSH Access
: 1000001101000 August 18, 2020, 04:38:39 PM
I'm really impressed, I never noticed that ssh was even possible for that device. It took me an embarrassing amount of work to get telnet working (also on the wiki page).

: Re: SSH Access
: Gogoli August 18, 2020, 04:53:10 PM
I tried for the telnet but I failed
SSH was pretty easy.

Let me know if gou want to experiment with this NAS:)