Thursday, July 19, 2018

SSH commands through bash

Hey all,

Long story short I'm trying to chain together some commands with bash but I can't seem to understand how to properly make this execute on a switch.

ssh -t 10.6.4.95 -l $myuser "conf" && "int vlan $vlanvar" && "name $vlannamevar" 

The first "conf" command is issued just fine, but I can't seem to make it issue any commands after that and I get the following:

./autodeploy.sh: line 101: int vlan 1700: command not found 

I'm obviously doing something wrong, any advice?

Edit: Got it working. Thank you, wonderful people!



No comments:

Post a Comment