A lightweight, open-source SSH Jumpserver for internal management.
Restricts shells on both the Master and the Slave nodes to ensure non-root users can only perform "jump" actions from Master to Slaves.
How it works:
kangaroo add-server to register remote servers. This automatically creates a new account on the Slave and configures it to forward syslog to the master.that’s it! Users now simply SSH into the Master, where they are greeted by the fzf menu where they can view authorized servers and “jump” to them instantly.
Tested on Ubuntu 24.04
cd /home && \
git clone https://github.com/stefanpejcic/kangaroo/ && \
cd kangaroo && bash install.sh
Optional: create a
server/ipsfile before running the installation script. Add the allowed IP addresses to this file, one per line. During installation, the script will restrict SSH access to these IPs and also apply corresponding iptables rules to limit network access accordingly.
# kangaroo
Usage: kangaroo [OPTIONS] COMMAND [ARGS]...
Kangaroo SSH JumpServer 🦘
Options:
--help Show this message and exit.
Commands:
add-server Add a new server and assign it to users.
delete-server Delete SERVER from USERNAME's SSH config file.
delete-server-all Delete SERVER from all users' SSH config files.
login-logs Show ssh login logs.
server Show SSH config for SERVER from all users.
servers List all hosts and number of users who have access.
user Show SSH servers and configs for a specific USERNAME.
users List all SSH Users.
kangaroo users
kangaroo user [USERNAME]
kangaroo servers
kangaroo server [SERVER_NAME]
kangaroo add-server --name "web-prod" --ip "192.168.1.10" --user "admin" --users "bob,alice"
| Argument | Example Value | Role in SSH Config | Description |
| — | — | — | — |
| --name | web-prod | Host web-prod | The shorthand alias you type to connect (e.g., ssh web-prod). |
| --ip | 192.168.1.10 | HostName 192.168.1.10 | The actual IP address or domain of the remote server. |
| --user | admin | User admin | The remote username used to log in to the destination (mostly root). |
| --users | bob,alice | File Path Target | The specific system users on this machine whose SSH configs will be modified. |
| --port | 22 | Port 22 | (Optional) The port the remote SSH service is listening on. |
| --description | Prod Server | # Description | (Optional) Adds a comment line above the config block for organization. |
| --password | ******** | N/A | (Optional) Used by the setup script for initial automation (not stored in config). |
kangaroo delete-server [USERNAME] [SERVER_NAME]
kangaroo delete-server-all [SERVER_NAME]
View SSH login logs:
kangaroo login-logskangaroo login-logs --search IP/username/actionkangaroo login-logs --followkangaroo login-logs --head --lines 20journalctl -t tlog-rec-sessionjournalctl -t tlog-rec-session --since todayjournalctl _UID=$(id -u stefan) -t tlog-rec-sessiontlog-play --reader=journal -M "TLOG_REC=814b22f52288410f9e1801d123f75aac-cc1-7c18"logo in server directoryTo enhance security, limit access to both the SSH service and the client.sh script so that only authorized IP addresses can connect.
/etc/ssh/sshd_config. Locate the line:
Match Group jump-users
and append the allowed IPs, example full line:
Match Group jump-users Address 192.168.1.10,203.0.113.5
server/ips and list each permitted IP on a separate line:
192.168.1.10
203.0.113.5