j is a simple expect script to securely automate the network login of IOS-like networking equipment by leveraging the open-source password manager pass.
Dependencies:
Functionality:
- Automatically insert username, password, and enable password during device login
- Password and enable password are stored securely in the pass
.password-store - Add agrument
--telnetto specify a telnet destination
Todo:
- Improve error handling
- Add linux sshd destination support
- Add alternative password manager support
Arch:
sudo pacman -S expect
sudo pacman -S passDebian and Ubuntu:
sudo apt install expect
sudo apt install passCentOS:
sudo yum install expect
sudo yum install passOpen j in a text editor and add your username and pass descriptors:
set username <your_username>
set password [exec pass show <your_pass_descriptor>]
set enable [exec pass show <your_pass_descriptor>]chmod +x jAlso, it's best if you moved j to a directory part of PATH.
SSH:
j 192.168.100.52Telnet:
j --telnet 192.168.100.42