Crates.io | rssh-tunnel |
lib.rs | rssh-tunnel |
version | 0.1.2 |
source | src |
created_at | 2024-05-15 10:36:24.836953 |
updated_at | 2024-05-17 11:52:35.363963 |
description | A command-line tool for creating SSH tunnels, allowing you to securely connect to remote hosts |
homepage | |
repository | https://github.com/prathanbomb/rssh-tunnel |
max_upload_size | |
id | 1240873 |
size | 54,124 |
rssh-tunnel is a command-line tool for creating SSH tunnels, allowing you to securely connect to remote hosts.
To use rssh-tunnel, you need to have Rust installed. You can then install rssh-tunnel using Cargo, the Rust package manager:
cargo install rssh-tunnel
rssh-tunnel provides both interactive and non-interactive modes for configuring SSH tunnels.
To run the CLI in interactive mode:
rssh-tunnel interactive
In interactive mode, the CLI will prompt you to enter the following information:
To create an SSH tunnel without interacting with the prompts, you can use the following command:
rssh-tunnel tunnel [OPTIONS]
--jump_host_user
: Jump host username.--jump_host_address
: Jump host address.--target_host_user
: Target host username.--target_host_address
: Target host address.--jump_port
: Jump host SSH port (default: 22).--target_port
: Target host SSH port (default: 22).--port_forward
: Port to forward (default: no).Create an SSH tunnel without port forwarding:
rssh-tunnel tunnel \
--jump-host-user <jump_host_user> \
--jump-host-address <jump_host_address> \
--target-host-user <target_host_user> \
--target-host-address <target_host_address> \
--jump-port <jump_ssh_port> \
--target-port <target_ssh_port>
Create an SSH tunnel with port forwarding:
rssh-tunnel tunnel \
--jump-host-user <jump_host_user> \
--jump-host-address <jump_host_address> \
--target-host-user <target_host_user> \
--target-host-address <target_host_address> \
--jump-port <jump_ssh_port> \
--target-port <target_ssh_port> \
--port-forward <forward_to_port>
Replace <jump_host_user>
, <jump_host_address>
, <target_host_user>
, <target_host_address>
, <jump_ssh_port>
, <target_ssh_port>
, and <forward_to_port>
with your desired values.
You can connect to an SSH tunnel using a profile name with the following command:
rssh-tunnel connect --profile <profile_name>
Replace <profile_name>
with the name of the profile you want to connect to.
You can also manage your profiles by listing all profiles or checking the profiles directory path.
To list all profiles:
rssh-tunnel profiles
To show the profiles directory path:
rssh-tunnel path
This project is licensed under the MIT License - see the LICENSE file for details.