GithubHelp home page GithubHelp logo

qrydat / sshtunnel-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from the-compiler/sshtunnel

0.0 2.0 0.0 208 KB

Managing of ssh tunnels via systemd

License: GNU General Public License v3.0

Shell 100.00%

sshtunnel-1's Introduction

sshtunnel

An utility to manage ssh tunnel connections easily via systemd.

Packages

Setting up new tunnels

First read /etc/sshtunnel.conf, understand it, and configure your new tunnel there.

Tunnels are run as the user sshtunnel. In order for sshtunnel to work, you’ll need to set up key-based authentication without a passphrase. Because of security concerns, you’re highly advised to create a new user with the shell set to /bin/false on the server:

# mkdir /var/lib/sshtunnel
# groupadd -r sshtunnel
# useradd -r -g sshtunnel -d /var/lib/sshtunnel -s /bin/false -c sshtunnel sshtunnel
# chown sshtunnel:sshtunnel /var/lib/sshtunnel

On the client, generate a new key with an empty passphrase like this:

# sshtunnel ssh-keygen

Then copy the echoed key by hand to /var/lib/sshtunnel/.ssh/authorized_keys.

Now open a test-connection to the tunnel to accept the host key:

# sshtunnel test <name>

Note this will call x11-ssh-askpass because ssh isn’t controlling the terminal.

If you’re not running X, you might want to do this by hand:

# su sshtunnel -s /bin/bash
$ ssh [email protected] exit

When you finished the setup procedure, you can now start the tunnel using sshtunnel, and then view its status:

# sshtunnel start <name>
# sshtunnel status <name>

Support

Feel free to mail me at [email protected] for any questions.

sshtunnel-1's People

Contributors

the-compiler avatar

Watchers

James Cloos avatar Stephen Bridgwater 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.