Monday, July 8, 2019

Creating a SSH/Telnet utility?

Hi, I would like to ask if possible to create a SSH utility. In where user can input just a hostname then translate to IP address using our internal tool then remote to the device?

Example:

rtr01 is equivalent to 1.1.1.1 recorded on our internal tool.

Target script: (to create a utility for example gossh)

user will just input 'gossh rtr01' and script will get the managed ip(our internal tool) and proceed in remoting and use the local user acct. in linux.

then the script will do this,

  1. get the mgmt ip of rtr01 using this command get rtr01 | grep IP
  2. then proceed in connecting 'ssh <localuser>@<x.x.x.x>'

Is this possible? should I do it on bash or in allias?

Thanks



No comments:

Post a Comment