Score:0

Unable to send remote commands to OLT ZTE C320. Server refused to start a shell/command

lt flag

My end goal is to execute each command inside "olt.sh" remotely on the OLT ZTE C320 without me having to paste it manually by login. Just like we send remote command to a linux server like: ssh [email protected] "uptime"

Server refused to start a shell/command - Picture/Screenshot here

My bash script "olt.sh" is:

conf t
interface gpon-olt_1/2/7
onu 50 type ABCD sn ZTEGCFE17F4B
exit
interface gpon-onu_1/2/7:50
tcont 1 profile 1G
gemport 1 tcont 1
service-port 1 vport 1 user-vlan 721 vlan 721
exit
pon-onu-mng gpon-onu_1/2/7:50
service hsi gemport 1 vlan 721 
wan-ip 1 mode pppoe username user1005 password cx123 vlan-profile HSI721 host 1
exit

--

On Windows CMD, I'm running these commands to send script through SSH via Putty:

C:\Users\abc>"C:\Program Files\PuTTY\putty.exe" -ssh [email protected] -pw zte -N -m "C:\Users\abc\Desktop\olt.sh"
C:\Users\abc>"C:\Program Files\PuTTY\putty.exe" -ssh [email protected] -pw zte -nc -m "C:\Users\abc\Desktop\olt.sh"
C:\Users\abc>"C:\Program Files\PuTTY\putty.exe" -pw zte -nc 136.1.1.100:22
C:\Users\abc>"C:\Program Files\PuTTY\putty.exe" -pw zte -nc 136.1.1.100:22  -m "C:\Users\abc\Desktop\olt.sh"
C:\Users\abc>"C:\Program Files\PuTTY\putty.exe" -ssh [email protected] -pw zte -N
C:\Users\abc>"C:\Program Files\PuTTY\putty.exe" -ssh [email protected] -pw zte
C:\Users\abc>"C:\Program Files\PuTTY\putty.exe" -ssh [email protected] -pw zte -m "conf t"
C:\Users\abc>"C:\Program Files\PuTTY\putty.exe" -ssh [email protected] -pw zte -m echo "conf t"
C:\Users\abc>"C:\Program Files\PuTTY\putty.exe" -ssh [email protected] -pw zte -m "C:\Users\abc\Desktop\olt.sh"


-m: read a remote command or script from a file
-nc: make a remote network connection in place of a remote shell or command

If I use -N then putty opens but gets stuck. I think because script invokes the shell but -N suppresses it.

I've gone through ZTE C320 documentation pdf, but no where this situation is explained. All the guidance or commands that pdf have is for within commands, not remote commands.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.