11.4.3 Secure command execution
You can execute operation commands on SSH servers by specifying commands as parameters in ssh command. The following figure shows an example configuration in which commands are executed from Switch A on Switch B.
|
The following figure shows an example of executing an operation command from Switch A on Switch B. When you execute an operation command on the Switch, you must specify parameters on the client side so that virtual terminals are forcibly assigned. Common SSH implementations specify-t parameters for ssh commandI will. Specify-t parameter in the operation-command ssh of Switch A, also in the example shown in the following figure.
> ssh -t staff@192.168.1.1 ping 10.10.10.1 staff@192.168.1.1's password: ****** PING 10.10.10.1 (10.10.10.1): 56 data bytes 64 bytes from 10.10.10.1: icmp_seq=0 ttl=255 time=0.108 ms 64 bytes from 10.10.10.1: icmp_seq=1 ttl=255 time=0.113 ms 64 bytes from 10.10.10.1: icmp_seq=2 ttl=255 time=0.116 ms ^C --- 10.10.10.1 PING statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max = 0.108/0.114/0.118 ms Connection to 192.168.1.1 closed. > |