Operation and maintenance artifact! A tool for accessing Linux terminals via the Web

Operation and maintenance artifact! A tool for accessing Linux terminals via the Web

2022-10-10 0 946
Resource Number 44903 Last Updated 2025-02-24
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

Recommended in this issue is a tool to access the device terminal through the Web — rtty.

Operation and maintenance artifact! A tool for accessing Linux terminals via the Web插图

rtty consists of a client and a server. The client is implemented in pure C, the server is implemented in GO language, and the front-end interface is implemented in vue. With rtty, you can access the terminal of your device through the Web from anywhere, and distinguish your different devices by device ID. rtty is great for maintaining Linux devices remotely.

class=”pgc-h-arrow-right” data-track=”14″>

  • Client C language implementation, very small, suitable for embedded Linux

SSL not supported: rtty(32K) + libev(56K)

SSL: + libmbedtls(88K) + libmbedcrypto(241K) + libmbedx509(48k)

  • Remote batch command execution
  • Support SSL: openssl, mbedtls, CyaSSl(wolfssl)
  • SSL two-way authentication (mTLS)
  • very convenient to upload and download files
  • Access different devices based on device ID
  • Support HTTP proxy – Access your device’s Web
  • Full-function terminal based on Xterm.js
  • Easy to deploy and use
Operation and maintenance artifact! A tool for accessing Linux terminals via the Web插图1

9e35c008e5394b088872e27f23152c44noop.image_

Operation and maintenance artifact! A tool for accessing Linux terminals via the Web插图3Operation and maintenance artifact! A tool for accessing Linux terminals via the Web插图4

class=”pgc-h-arrow-right” data-track=”107″> Client dependencies

  • libev – High performance event loop library
  • mbedtls(polarssl), CyaSSl(wolfssl), or openssl – if you need to support SSL

Deploy server

1 Download the compiled binary from the Release page or compile it yourself

git clone https://github.com/zhaojh329/rttys

cd ui
npm install
npm run build
cd ..

./build.sh linux amd64

2 authentication

  • Token

Generate a token:

$ rttys token
Please set a password:******
Your token is:  34762d07637276694b938d23f10d7164

Use token:

$rttys -t  34762d07637276694b938d23f10d7164
  • SSL two-way authentication (mTLS)

You can enable mTLS by specifying the device CA store in the configuration file (valid file) or in the CLI (parameter ssl-cacert). Devices that do not have a valid CA in storage will be disconnected at the TLS handshake.

3 Run service

Move the rttys executable to /usr/local/bin/

sudo mv rttys /usr/local/bin/

Copy the configuration file to /etc/rttys/

sudo mkdir  /etc/rttys
sudo cp rttys.conf /etc/rttys/

< p data – track = “44” > create a systemd unit file: / etc/systemd/system/rttys. Service < / p >

[Unit]
Description=rttys
After=network.target

[Service]
ExecStart=/usr/local/bin/rttys run -c /etc/rttys/rttys.conf
TimeoutStopSec=5s

[Install]
WantedBy=multi-user.target

To start the service for the first time, perform the usual systemctl operation

sudo systemctl  daemon-reload
sudo systemctl enable rttys
sudo systemctl start rttys

The service can be stopped by

sudo systemctl stop rttys

4 Database preparation (Sqlite, MySql, or Mariadb)

Log in to the database console as root on the database instance

mysql -u root -p

Create the database user that will be used by Rttys, authenticated by password. This example uses “rttys” as the password. Please use the security password

for your instance

CREATE USER 'rttys' IDENTIFIED  BY 'rttys'; 

Create the database using the UTF-8 character set and collation rules. Make sure to use the utf8mb4 character set instead of utf8, as the former supports all Unicode characters (including emojis) beyond the basic multilingual plane. In addition, choose a sorting rule based on what you expect. If in doubt, use unicode_ci or general_ci

CREATE DATABASE rttys CHARACTER SET 'utf8mb4' COLLATE  'utf8mb4_unicode_ci'; 

Grant all permissions on the database to the database user created above

GRANT ALL  PRIVILEGES ON rttys.* TO 'rttys';
FLUSH PRIVILEGES; 

Install rtty (for Linux distributions)

Install dependencies

sudo apt install -y libev-dev libssl-dev       # Ubuntu, Debian
sudo pacman -S --noconfirm libev openssl      # ArchLinux
sudo yum install -y libev-devel openssl-devel #  Centos

Clone rtty code

git clone --recursive https://github.com/zhaojh329/rtty.git

compile

cd rtty & &  mkdir build & &  cd build
cmake ..  & &  make install

Run rtty

Replace the following parameters with your own

sudo rtty -I 'My-device-ID' -h 'your-server' -p 5912 -a -v -d 'My Device Description'

If your rttys is configured with a token, add the following parameters (replace the tokens below with your own generation)

-t  34762d07637276694b938d23f10d7164

Access

through a browser

Access your server using a Web browser:
http://your-server-host:5913, then click the Connect button.

or directly connect to the device without Web login (device whitelist needs to be configured on the server)

http://your-server-host:5913/connect/devid1

http://your-server-host:5913/connect/devid2

Transfer files from local to remote device

rtty -R

Transfer file from remote device to local

rtty -S test.txt

—END—

Open source protocol: MIT

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code Operation and maintenance artifact! A tool for accessing Linux terminals via the Web https://ictcoder.com/kyym/operation-and-maintenance-artifact-a-tool-for-accessing-linux-terminals-via-the-web.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service