Tag Archives: How to OpenSSH

OpenSSH Secure Shell provides a large suite of secure tunneling capabilities, several authentication methods, and sophisticated configuration options.

Synology DSM with SSH Terminal

How to deploy GateOne terminal emulator SSH client on Synology DSM

GateOne is a web-based HTML5 driven open-source terminal emulator with a powerful SSH client that can be used to run any terminal application from the browser and provide virtual terminal connections. GateOne can be used as a supplement to web-based management interfaces. This post shows how to deploy and use GateOne with Synology DSM.

GateOne for each browser they supports WebSocket, a browser plugin is not required

Run Synology DSM SSH Client ping

Synology DSM does not provide a way for diagnostic tasks such as ping or traceroute, with an embedded SSH client these functions comes available. The GateOne SSH client offers other useful applications, such as bypassing a proxy, or if there is no VPN to the NAS and the firewall only allows port 443 (HTTPS) for the browser.

GateOne is not provided or managed by Synology itself, but can be retrieved from the SynoCommunity repository. The SynoCommunity offers free packages for Synology NAS devices.

Note. GateOne version 0.9.3 for DSM 5/6, support for DSM 7 is currently not available (23.8.2021).

How to add the SynoCommunity repository

From DSM you open the main menu with the icon at the top left, there you will find the package center.

Synology Package Center

Click on the Icon Package Center to open it, then on button Settings.

Synology Packet Center Settings

In the General pane that opens, under Trust level, select Synology Inc. and Trusted Publishers.

Synology_Packet_Center_Settings_General

Then go to the Package Sources section.

Synology_Packet_Center_Packet_Source

Click the Add button and insert the package source, enter SynoCommunity as the name and paste the URL https://packages.synocommunity.com/ for location and click OK.

Synology_Packet_Center_Add_Package

Now packages can be installed from SynoCommunity, here you enter gateone in the search field at the top of the magnifying glass.

After GateOne appears from the community package source, the app is provided by clicking install.

There are now many possible applications with GateOne.

Note. In order to be able to access the NAS itself via SSH, the SSH service must be activated in the DSM control panel, how to do it can find here. The most commands require sudo permission, i.e. sudo ping.

What is Websocket ?

The WebSocket protocol is a TCP-based network protocol that was designed to establish a bidirectional connection between a web application and a WebSocket server or a web server that also supports WebSockets

Generating a new ssh key use for Github

Howto deploy SSH Key authentication for Github with using VS Code Editor

After looking for an adequate solution in the word wide web, I came to the following workaround, which I describe here. I developing in VS Code on Windows 10 and don’t want to run commit and push in the Git Bash terminal again and again, especially because VS Code comes out of the box with all of the Git skills include.

Let’s get started, if you not allready have Git for Windows on your Windows 10, you have to download here.

First open Git Bash and go to directory ~/.ssh, if it’s not exist you can create in windows explorer under the users home path, or type mkdir .ssh in Git bash.

cd ~/.ssh
ssh-keygen -t rsa -b 4096 -C "your.email@domain.com"
clip < id_rsa.pub

A key pair as privat and public key are generated, a passphrase you can leave but keep the key on a safe place, the command clip copies the public key to the clipboard, which will be saved to Github account in the next step.

Go to Github and sign in with your account, open profile in the upper right corner, navigate to Settings and click SSH and GPG keys, click New SSH key, paste the public key into the key field, for title you can enter your.email@domain.com.

Now ready to go back to Git bash and enter the following commands, with option -T the host is entered in known_hosts, here you have to confirm with yes, the command git push authorized on Github by use the key in ~/.ssh/id_rsa.

cd ~/my_project
ssh -T git@github.com
git remote set-url origin git@github.com:account/my_project.git
git add -A
git commit -am "commit update"
git push

place instead of account your github account, and for my_project the name of your project you deploying.

Now open directory out from Git bash with VS Code.

$ code my_project

VS Code Editor offers git commands via the main toolbar and the icon menu.

vs_code
vs_code_editor

Advanced configuration

By default ssh looks for the key in a file named id_rsa, if you want to authenticate to multiple hosts, the following directive applies in the file ~/.ssh/config

Host github.com
	HostName github.com
	User git
	IdentityFile ~/.ssh/id_rsa_github

Deploy Git on Linux Shell

If you use Linux “should be preferred” then the following command lines create a Git project directory and add README.md, further Commit and Push them.

git init
git config --global user.name "my_project"
git config --global user.email "your.email@domain.com"
touch README.md
git add .
git add README.md
git commit -m "add README"
git commit -m "Initial commit"
git push -u origin master