shell - Automate Linux server login with 2 users using terminal in Ubuntu 14.04 -


i need authenticate 2 users on linux server using following users:

  1. user1
  2. root

i automate user1 using tool named - sshpass. post terminal looses communication local machine , hence ignores commands comes after. shell script follows:

sshpass -p my_password ssh user1@my_domain_name spawn su root_password 

how make above script automate input of root password well. ?

the tools tera_term , mtputty works great in windows in ubuntu (14.04) ?


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -