On clustermode: You have configured automatic login for the clustershell
On linux: You have installed expect (# yum install expect expectk)
create an expect script.
mind you: grcm1 is my clustername and gr-01 is
the name of my first clusternode.
$ vi direct
#!/usr/bin/expect
spawn ssh admin@grcm1 set advanced \; node systemshell -node gr-01
expect "login:"
send "diag\r"
expect "Password:"
send "diagpassword\r"
send "sudo bash\r"
send "id\r"
interact
(end script)
$ chmod +x direct
$ ./direct
spawn ssh admin@grcm1 set advanced ; node systemshell -node gr-01
Data ONTAP/amd64 (gr-01) (ttyp1)
login: diag
diag
Password:hurray
sudo bash
id
Last login: Fri Apr 19 01:57:21 from localhost
Warning: The system shell provides access to low-level
diagnostic tools that can cause irreparable damage to
the system if not used properly. Use this environment
only when directed to do so by support personnel.
gr-01% sudo bash
bash-3.2# id
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
bash-3.2#