Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.
/ j Public archive

Securely automate the network login of networking devices

License

Notifications You must be signed in to change notification settings

raylas/j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

j

j in motion

j is a simple expect script to securely automate the network login of IOS-like and Junos-based 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 argument --t to specify a telnet host
  • Add argument --j to specify a junos host

Todo:

  • Add ability to specify alternate port
  • Improve error handling
  • Add alternative password manager support

Use

Install expect and pass

Arch:

sudo pacman -S expect
sudo pacman -S pass

Debian and Ubuntu:

sudo apt install expect
sudo apt install pass

CentOS:

sudo yum install expect
sudo yum install pass

Adjust variables

Open 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>]

Make j executable

chmod +x j

Also, it's best if you moved j to a directory part of PATH.

Connect to host

SSH:

j 192.168.100.52

Telnet:

j --t 192.168.100.42

About

Securely automate the network login of networking devices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published