Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graboskyc/faketelnet
This is a simple utility that will simulate an SSH endpoint as a Ciena, Cisco, or Juniper with a very small command set.
https://github.com/graboskyc/faketelnet
ciena cisco docker juniper simulator ssh ssh-endpoint
Last synced: 28 days ago
JSON representation
This is a simple utility that will simulate an SSH endpoint as a Ciena, Cisco, or Juniper with a very small command set.
- Host: GitHub
- URL: https://github.com/graboskyc/faketelnet
- Owner: graboskyc
- License: apache-2.0
- Created: 2016-07-27T20:44:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-02T17:06:33.000Z (over 8 years ago)
- Last Synced: 2024-07-30T20:14:05.833Z (5 months ago)
- Topics: ciena, cisco, docker, juniper, simulator, ssh, ssh-endpoint
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# About This Repo
This is a simple utility that will simulate an SSH endpoint as a Ciena, Cisco, or Juniper with a very small command set.# To Run This
## System prep
* Download and install Linux (here Ubuntu)
* Install docker `apt-get install docker.io`
* Note that to do installs and start containers, you must be `root` or use the `sudo` command prefixed to each one
* If installing Linux onto a VM, make sure the network adaptor is in the correct mode depending on use case, such as bridged if you want to SSH in from another machine than the VM host
* If you want to start the container at boot, [follow this tutorial](https://docs.docker.com/engine/admin/host_integration/) after getting the container onto your system via the "From Source" or "From DockerHub" sections below## From Source
* Download this repo somewhere (here `/root/FakeTelnet`)
* Change to the directory `cd /root/FakeTelnet`
* Build the container `docker build -t gskyft .`
* Start the container `docker run -t -i -d -p 2222:22 --name ft gskyft`
* After that, you should be able to ssh to the server on port 2222## From DockerHub
* Start the container `docker run -t -i -d -p 2222:22 --name ft graboskyc/faketelnet`
* After that, you should be able to ssh to the server on port 2222# Command Set
## Juniper
* SSH into the device on port 2222 using username `juniper` and password `juniper0`
* Enter configuration mode (`configure`)
* Set root password (`set system root-authentication plain-text-password newpassword`)
* Hostname is customizable and when you commit, it will set the host name in the prompt
* Set hostname (`set system host-name JuniperMX480-01`)
* Set domain (`set system domain-name example.com`)
* Set default route (`set system backup-router 10.0.0.1`)
* Set default route (`set routing-options static route default nexthop 10.0.0.1 retain noreadvertise`)
* Save configuration (`commit`)
* Kill connection (`exit`)## Cisco
* SSH into the device on port 2222 using username `cisco` and password `cisco`
* Show interfaces (`show ip interface brief`)
* Show interfaces (`show interface descriptions`)
* Show terminal server hosts (`show hosts`)
* Enter configure mode (`configure terminal`)
* Add a new terminal server host (`ip host ciena3916 2048 192.168.1.1`)
* Exit configure mode (`end`)
* Save configuration (`write memory`)
* Enter any bad command and it will spit it back to you
* Kill connection (`exit`)## Ciena
* SSH into the device on port 2222 using username `su` and password `wwp`
* Create a VLAN (`vlan create vlan 100`)
* Note that all VLAN numbers and ports (1-6) are usable for all these commands. Also note you must create the VLAN before adding it to a port. The script does not have logic to handle this
* Add VLAN to a port (`vlan add vlan 100 port 2`)
* See list of VLANs on which port (`vlan show`)
* Show statistics with fake counters (`port show port 2 statistics`)
* All ports share the same fake statistics. Once cleared, they will be zero for the rest of the SSH session.
* Reset fake counter statistics (`port clear port 2 statistics`)
* Remove VLAN from port (`vlan remove vlan 100 port 2`)
* Be sure to remove the VLAN from the port before deleting. There is no logic to handle this
* Delete a VLAN (`vlan delete vlan 100`)
* Save configuration (`configuration save`)
* Enter any bad command and it will spit it back to you
* Kill connection (`exit`)