SSH with putty/plink lands in Linux shell - how to get out?

DOWNLOAD THE LATEST FIRMWARE HERE
jackkirk
Member
 
Posts: 19
Joined: Sat Jan 13, 2018 9:45 pm
Has thanked: 2 times
Been thanked: 1 time

SSH with putty/plink lands in Linux shell - how to get out?

Sun May 06, 2018 10:27 pm

In this post:

viewtopic.php?f=17&t=1261&p=9375&hilit=land+in+command#p9375

sirhc says:

"When you SSH into the device you land in the CLI, there is no way to initially land in the Linux Shell (that I know of)"

I have found it real easy to do.

If I use vanilla PuTTy with SSH I have no problems getting to the Netonix shell (I assume this is the correct terminology) - see attachments "PuTTy session start.png" and "PuTTy session log.txt".

However if I use the PuTTy plink command line capability I land in the command line shell and can find no way out - see attachment "plink session log.txt".

How can I use plink to issue Netonix commands to the switch?

BTW the switches port 22 is forwarded to port 23

I am looking at programmatically setting up scripts using plink so this is a major roadblock - any and all help greatly appreciated.

Thanks...
Attachments
plink session log.txt
(2.46 KiB) Downloaded 310 times
PuTTY session log.txt
(2.06 KiB) Downloaded 343 times
PuTTy session start.png

User avatar
jakematic
Experienced Member
 
Posts: 168
Joined: Thu Jul 14, 2016 8:15 am
Location: NC USA
Has thanked: 362 times
Been thanked: 87 times

Re: SSH with putty/plink lands in Linux shell - how to get o

Sun May 06, 2018 10:48 pm

Depends on what you want to do.

There are some limited functions with the switch command.
I'm convinced that netonixctl does more than I've been able to suss, but that is secret sauce...

They won't let you control PoE other than bouncing it which frustrates me to no end but their house their rules.
I've done things with passwordless SSH before with dropbear, but can't find/recall now - maybe search my posts?


admin@ws12:/www# which switch
/usr/bin/switch
admin@ws12:/www# switch --help
Usage: switch [-hvmcCFabdegijko] [-q <port>] [-A <0-255>] [-I none | <port>[,<port>] ... ] [-J none | <mirrorport>=<port>[,<port>] ... ] [-k <port>] [-K <port>] [-p <port>] [-r <bc>,<mc>,<uc>]
-a: Get fan level
-A: Set fan level
-b: Get temp
-c: Show port config
-C: Show chip ID
-d: Show port status
-e: Reset port counters
-F: Flush MAC table
-g: Collect data (daemon)
-h: Display this
-i: Show multicast members
-I: Set multicast members
-j: Show mirror configuration
-J: Set mirror configuration
-k: Fan control (daemon)
-l: I2C read
-m: Show port map
-n: Configure PHY LEDs
-o: Get fan speed
-p: Get port counters
-q: Show QoS counters (detailed counters for one port)
-r: Set storm control limits (broadcast, multicast, unicast)
-s: Start CLI
-S: Start CLI on serial console
-t: Enable port forwarding
-T: Disable port forwarding
-u: Get port diagnostic information
-w: Get MAC age time
-W: Set MAC age time
-x: Run MAC aging
-z: Enable loopback on port
-Z: Disable loopback on port
-1: Set port isolation members
-2: Upgrade power supply firmware
-3: Pretty print config
-v: Verbose
admin@ws12:/www#

jackkirk
Member
 
Posts: 19
Joined: Sat Jan 13, 2018 9:45 pm
Has thanked: 2 times
Been thanked: 1 time

Re: SSH with putty/plink lands in Linux shell - how to get o

Sat May 12, 2018 7:30 am

They won't let you control PoE other than bouncing it which frustrates me to no end

On further digging it turns out you can control PoE completely, see:

viewtopic.php?f=8&t=2657&p=18570&hilit=php+poe#p18579

this requires PHP skills which I don't have but in the meantime I have cajoled a member of my development environment of choice - B4X - to enhance a SSH library he developed to do what I want, see:

https://www.b4x.com/android/forum/threads/sshj-ssh-scp-sftp-for-java.88615/page-2#post-587213[/

Return to Hardware and software issues

Who is online

Users browsing this forum: Google [Bot] and 38 guests