miyahan / telnet
Telnet client in php
Installs: 15 546
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 30
Open Issues: 0
Requires
- php: >=5.6.0
This package is not auto-updated.
Last update: 2024-10-27 20:00:25 UTC
README
Telnet client written in php
Description
- Telnet to Linux/UNIX servers
- Telnet to network routeres (Cisco IOS , Juniper JUNOS)
Requirement
- PHP 5.6 or later (PHP 7.0 ready!)
Usage
Telnet to Cisco IOS router
try { $telnet = new \miyahan\network\Telnet('10.0.0.1'); $telnet->connect(); $telnet->login('username', 'password', 'ios'); $telnet->exec('terminal length 0'); $telnet->exec('enable'."\r\n".'secret'); $telnet->setPrompt('router#'); $result = $telnet->exec('show env all'); echo $result."\n"; } catch (Exception $e) { echo $e->getMessage(); }
Installation
Use composer (https://packagist.org/packages/miyahan/telnet)
Author
- Bestnetwork <reparto.sviluppo@bestnetwork.it">
- Dalibor Andzakovic dali@swerve.co.nz
- Matthias Blaser mb@adfinis.ch
- Christian Hammers chammers@netcologne.de
- Frederik Sauer fsa@dwarf.dk
- Kouhei Miyasaka k.miyasaka@jpn21.net
License
MIT