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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -