Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I work with command line on synology?

Tags:

synology

How do I access the command line interface on a Synology NAS.

Specifically, I am trying to access the command line on a Synology DS1520+, running DSM 7.1, so I can enter the command: sudo shutdown -h, so I can power down the NAS remotely.

I am pretty sure I should use SSH and unix/linux style commands.

like image 701
gamo Avatar asked Feb 29 '16 08:02

gamo


People also ask

How do I access Synology command line?

To access the Terminal of your Synology NAS, you will have to enable the SSH service of your Synology NAS. To do that, open the Control Panel app and click on Terminal & SNMP as marked in the screenshot below. From the Terminal tab, check Enable SSH service and click on Apply. Click on OK.

How do I SSH into my Synology?

Login into your NAS then go to Control Panel / Terminal & SNMP / Terminal tab – Check Enable SSH service and set port 22 then click Apply. Follow the instructions in the image below. Note: It is strongly recommended not to use port 22, but to change it to something else, between port 49152 and port 65535.

How do I control my Synology NAS?

Manage your Synology NAS with DSM mobileOpen your mobile web browser. In the address bar, enter the IP address of your NAS. Enter your DSM account name and password and tap Sign In.


3 Answers

You can use your favourite telnet (not recommended) or ssh (recommended) application to connect to your Synology box and use it as a terminal.

  1. Enable the command line interface (CLI) from the Network Services
  2. Define the protocol and the user and make sure the user has password set
  3. Access the CLI

If you need more detailed instruction read https://www.synology.com/en-global/knowledgebase/DSM/help/DSM/AdminCenter/system_terminal

like image 54
Peter Avatar answered Sep 22 '22 19:09

Peter


I use GateOne from the synocommunity.

Go into settings in Package Center and add http://packages.synocommunity.com/ as a package source. Then you should be able to add it easily via Package Center.

like image 37
Antony Scott Avatar answered Sep 24 '22 19:09

Antony Scott


The current windows 10 (Version 1803 (OS Build 17134.1)) has SSH built in. With that, just enable SSH from the Control Panel, Terminal & SNMP, be sure you are using an account in the Administrator's group, and you're all set.

Launch Powershell or CMD, enter ssh yourAccountName@diskstation

The first time it will cache off your certificate.

EDIT:

Further detailed explanations can be found on the synology docs page:

How to login to DSM with root permission via SSH Telnet

like image 28
AUSTX_RJL Avatar answered Sep 23 '22 19:09

AUSTX_RJL