# rssh-tunnel rssh-tunnel is a command-line tool for creating SSH tunnels, allowing you to securely connect to remote hosts. ## Features - **Interactive and Non-Interactive Modes:** Choose between interactive mode, where the CLI prompts you for input, or non-interactive mode, where you provide input via command-line options. - **Profile Management:** Easily create, save, load, and overwrite SSH tunnel configurations as profiles. - **Port Forwarding:** Optionally set up port forwarding for your SSH tunnels. - **Easy Installation:** Install rssh-tunnel easily using Cargo, the Rust package manager. ## Installation To use rssh-tunnel, you need to have Rust installed. You can then install rssh-tunnel using Cargo, the Rust package manager: ```bash cargo install rssh-tunnel ``` ## Usage rssh-tunnel provides both interactive and non-interactive modes for configuring SSH tunnels. ### Interactive Mode To run the CLI in interactive mode: ```bash rssh-tunnel interactive ``` In interactive mode, the CLI will prompt you to enter the following information: * Jump host username * Jump host address * Target host username * Target host address * Jump host SSH port (default: 22) * Target host SSH port (default: 22) * Port to forward (default: no) ### Non-Interactive Mode To create an SSH tunnel without interacting with the prompts, you can use the following command: ```bash rssh-tunnel tunnel [OPTIONS] ``` #### 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). #### Examples: Create an SSH tunnel without port forwarding: ```bash rssh-tunnel tunnel \ --jump-host-user \ --jump-host-address \ --target-host-user \ --target-host-address \ --jump-port \ --target-port ``` Create an SSH tunnel with port forwarding: ```bash rssh-tunnel tunnel \ --jump-host-user \ --jump-host-address \ --target-host-user \ --target-host-address \ --jump-port \ --target-port \ --port-forward ``` Replace ``, ``, ``, ``, ``, ``, and `` with your desired values. ### Connect with Profile You can connect to an SSH tunnel using a profile name with the following command: ```bash rssh-tunnel connect --profile ``` Replace `` with the name of the profile you want to connect to. ### Managing Profiles You can also manage your profiles by listing all profiles or checking the profiles directory path. To list all profiles: ```bash rssh-tunnel profiles ``` To show the profiles directory path: ```bash rssh-tunnel path ``` # License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.