All Projects → kootenpv → Loco

kootenpv / Loco

Licence: agpl-3.0
Share localhost through SSH. Local/Remote port forwarding made safe and easy.

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Loco

Alfred Ssh
SSH workflow for Alfred for Mac with powerful hostname expansion/completion
Stars: ✭ 78 (-20.41%)
Mutual labels:  ssh
Castle Winbuntu
Homesick Castle for use on WSL.
Stars: ✭ 87 (-11.22%)
Mutual labels:  ssh
Sshconfig
Minimal command to Add/Remove/list ssh aliases in $HOME/.ssh/config
Stars: ✭ 93 (-5.1%)
Mutual labels:  ssh
Paramgmt
A parallel SSH-based remote machine management system
Stars: ✭ 80 (-18.37%)
Mutual labels:  ssh
Ssh Connect
🐙 simple ssh manager based on bash/zsh history
Stars: ✭ 86 (-12.24%)
Mutual labels:  ssh
Paramikojs
port of the paramiko library from python->javascript
Stars: ✭ 89 (-9.18%)
Mutual labels:  ssh
Kubectl Cssh
A kubectl plugin to ssh into Kubernetes nodes within separate tmux panes
Stars: ✭ 76 (-22.45%)
Mutual labels:  ssh
Iap Desktop
IAP Desktop is a Windows application that provides zero-trust Remote Desktop and SSH access to Linux and Windows VMs on Google Cloud.
Stars: ✭ 96 (-2.04%)
Mutual labels:  ssh
Swiff
💁 Command line tools for common local ↔ remote server tasks.
Stars: ✭ 87 (-11.22%)
Mutual labels:  ssh
Daggy
Daggy - Data Aggregation Utility. Open source, free, cross-platform, server-less, useful utility for remote or local data aggregation and streaming
Stars: ✭ 91 (-7.14%)
Mutual labels:  ssh
Jjg Ansible Windows
[DEPRECATED] Windows shell provisioning script to bootstrap Ansible from within a Vagrant VM.
Stars: ✭ 82 (-16.33%)
Mutual labels:  ssh
Tomahawk
A simple ssh wrapper to execute commands into many hosts.
Stars: ✭ 83 (-15.31%)
Mutual labels:  ssh
Networkmanager
A powerful tool for managing networks and troubleshoot network problems!
Stars: ✭ 1,296 (+1222.45%)
Mutual labels:  ssh
Awa Ssh
Purely functional SSH library in ocaml.
Stars: ✭ 80 (-18.37%)
Mutual labels:  ssh
Ssh Mitm
SSH man-in-the-middle tool
Stars: ✭ 1,328 (+1255.1%)
Mutual labels:  ssh
Ssh Shop
项目描述:建立购物小商城平台. 实现了前台页面系统。 技术描述:通过Spring 主框架来管理Struts2和Hibernate 框架搭建的电商小平台,用MySQL数据库并创建了表有用户表,订单表,商品表,商品分类表,商品内容表,购物车表等来存储数据。用到hibernate的懒加载方式来展示页面商品,商品分类,分类内容等信息。利用hibernate中session的方法实现分页显示商品。在网上下载的接口文档开发银行开放性接口,实现在线支付功能。用到html,css,js,ajax技术开发前端页面。后台实现利用Struts2的MVC模式对前端视图与后台数据交互,hibernate来处理dao层的业务逻辑的实现。
Stars: ✭ 78 (-20.41%)
Mutual labels:  ssh
Autossh
Heavily customizable AutoSSH Docker container
Stars: ✭ 86 (-12.24%)
Mutual labels:  ssh
Sidedoor
SSH connection daemon for Debian/Raspbian/Ubuntu/etc
Stars: ✭ 97 (-1.02%)
Mutual labels:  ssh
Docker Tunnel
a (simple) dockerized ssh tunnel
Stars: ✭ 96 (-2.04%)
Mutual labels:  ssh
Webssh2
Web SSH Client using ssh2, socket.io, xterm.js, and express. webssh webssh2
Stars: ✭ 1,293 (+1219.39%)
Mutual labels:  ssh

Loco

Build Status PyPI PyPI

Share localhost through SSH. Making local/remote port forwarding easy and safe.

Story

sender wants to share his web app hosted at port 52222. receiver wants to see what the app is all about.

  • receiver runs loco pubkey to copy their public SSH key to clipboard
  • receiver sends pubkey to sender by chat, mail or pigeon.
  • sender runs loco create "RECEIVER_PUBKEY". This is the interesting part!
  • receiver runs loco listen SENDER, where sender is ssh config such as [email protected]

Receiver can now see what sender is seeing at localhost:52222

When you are behind a (company) firewall/router, then there are 3 possible solutions.

  • You can use a "shared" area (such as a cloud instance).
  • You can do remote forwarding instead of local forwarding. Basically, as long as 1 of the 2 parties is not within a firewall, it'll work.
  • You can open up port 22 (SSH).

Features

  • Convenience. Share whatever is happening on your localhost with someone else
  • Safety. Nothing beats SSH. The only open port required is 22. Share your HTTP through SSH!
  • Containment. Specifically creates an SSH user that can ONLY do port forwarding; nothing else.
  • Cross-platform. Works on OSX and Linux in general.
  • No 3rd party. Unlike ngrok, you won't need to rely on a third party.

Installation

Works using both Python 2.7+ and Python 3+:

pip install loco

Functionality

# cast your localhost to someone else
loco cast RECEIVER

# No need to keep a terminal open
loco listen SENDER --background

# Kills a `loco listen` in the background
loco kill [optional: PORT, default=52222]

# Remove all settings for a user (by default loco0).
loco remove_user

# View how you can be accessed
loco ls # outputs
user="loco0" port=52222 ssh_key=AAAAB3NzaC ..... joCyayMg+d account="[email protected]"

# Create specific user+port combination (don't forget to share this info with buddy)
# And don't forget the quotes
loco create "PUBKEY" [email protected] --port 5000

# NOTE: default is to serve at same as remote/local, need to give 1
loco listen [email protected] --remote_port 5000

# push your content to someone who created a loco user for you
loco cast [email protected] --local_port 5000

# --expose exposes `listen` or `cast` to 0.0.0.0
# requires ssh to accept casting, i.e.:
# 'GatewayPorts yes' in '/etc/ssh/sshd_config'
loco cast [email protected] --expose

For issues, such as both parties being within a firewall, you can use a server in between (e.g. some cloud instance). If just one party is within firewall, then you can use either cast/listen.

In case of using an inbetween server:

# on server:
loco create "PUBKEY_RECEIVER"
loco create "PUBKEY_SENDER"
# on sender:
loco cast [email protected]
# on receiver
loco listen [email protected]

The interesting part

loco create creates a restricted user on the senders' machine. This user (by default called loco0) can do nothing except for allow port forwarding at a given port (by default 52222). The receiver can use loco listen SENDER_IP to use SSH for portforwarding (again by default as loco0, port 52222). The good thing is that you can now safely make a HTTP connection without allowing this user to do anything else. Note that everything can be configured; the used username, the senders' port to be shared, and on which port it will be receivable by the receiver.

To find out more possibilities, you can use --help using the CLI:

[email protected]:~ $ loco listen --help
Usage: loco listen [OPTIONS] HOST

  Listen on a remote localhost port and serve it locally.

  Provide host.

 Example: loco listen [email protected]

Options:
  -b, --background
  --local_port INTEGER
  --remote_port INTEGER
  --browse TEXT
  --help                 Show this message and exit.

You will have complete control over whether you want to allow sharing a single port with many users, or each user their own port.

loco users are special

Any username starting with "loco" will be considered a loco user. Apart from being restricted, the CLI tool also takes extra care for loco users. For example, it will warn you when you would try to remove non loco users. It will throw an exception when you try to delete yourself. loco ls also only lists the loco users.

Contributing

Feel free to make suggestions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].