CLI via SSH
![](/avatar/avatar-17.png)
I wonder if anyone can help me?
I want to use PUTTY from the command line to sign into the switch using SSH, this I can do with no problem. But, I want to use the -m switch to pass a series of commands to the switch, this I cannot do, the commands in the file are rejected. I have tried every variation I can think of but can't get it to work. What am I missing?
I hope I haven't missed something obvious!
Mark
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
I suggest you upload the picture, I still having some doubt about your quesions.but I guess there are two reasons may cauise this issue:
1. There are something wrong with your Putty?
2. The TP-Link do not support the parameter that you typed.
- Copy Link
- Report Inappropriate Content
Thanks for the reply.
On my windows 10 machine I am typing:
putty 192.168.10.188 -ssh -l admin -i d:\privkey.ppk
And I get a CLI window wherein I can enter commands.
But when I type:
putty 192.168.10.188 -ssh -l admin -i d:\privkey.ppk -m test.txt
(I've attached the test.txt file)
I get a windows message: "PuTTY Fatal Error: Remote side unexpectedly closed network connection" and the commands in the file have not been executed.
Thanks for your help.
- Copy Link
- Report Inappropriate Content
Quote from the PuTTY manual section 3.8.3.6 -m: read a remote command or script from a file:
With some servers (particularly Unix systems), you can even put multiple lines in this file and execute more than one command in sequence, or a whole shell script; but this is arguably an abuse, and cannot be expected to work on all servers. In particular, it is known not to work with certain ‘embedded’ servers, such as Cisco routers.
I think the same applies to TP-Link switches and other embedded systems using dropbear as the SSH server.
- Copy Link
- Report Inappropriate Content
- Copy Link
- Report Inappropriate Content
I use not Putty, but Kitty with Scripting. It has Line delay for cisco-like switches. You can easily batch commands.
- Copy Link
- Report Inappropriate Content
- Copy Link
- Report Inappropriate Content
Maybe it is possible, but I do not know, how to do it :)
- Copy Link
- Report Inappropriate Content
![](/avatar/avatar-17.png)
Information
Helpful: 0
Views: 3692
Replies: 7
Voters 0
No one has voted for it yet.