Giter Club home page Giter Club logo

remote-control-linuxos-configuration's Introduction

Turn a computer as a server and access it from everywhere

System used:

  • Ubuntu 20.04

Tools will be used:

Install Zerotier

Sign up an account on zerotier and create a network. It will provide us with a network ID.

Then install the Zerotier on Linux:

curl -s https://install.zerotier.com | sudo bash

Output:

......

*** Success! You are ZeroTier address [ eaXXXXXaXXe ].

Start and enable the zerotier service:

sudo systemctl start zerotier-one.service
sudo systemctl enable zerotier-one.service

Join the network created previously using the network ID:

sudo zerotier-cli join YOUR_NETWORK_ID

Output:

200 join OK

Check if we have joined the network:

sudo zerotier-cli listnetworks

200 listnetworks <nwid> <name> <mac> <status> <type> <dev> <ZT assigned ips>

200 listnetworks afXXXXXXXXXX88c ......

Extra configuration for inbound and outbound rules, sudo might required:

iptables -I FORWARD -i ztc25p4azo -j ACCEPT
iptables -I FORWARD -o ztc25p4azo -j ACCEPT
iptables -t nat -I POSTROUTING -o ztc25p4azo -j MASQUERADE

Install openssh-server:

Install ssh:

sudo apt install openssh-server

Check the installation process:

sudo apt list --installed | grep openssh-server

Output:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

openssh-server/focal-updates,now 1:8.2p1-4ubuntu0.4 amd64 [installed]

Check ssh status:

sudo service ssh status

Output:

โ— ssh.service - OpenBSD Secure Shell server

Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: e>

Active: active (running) since Fri 2022-04-15 17:57:43 CST; 43s ago

......

Connect to Linux Server:

Replace your username and IP address.

Enjoy!

remote-control-linuxos-configuration's People

Contributors

hyc0812 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.