0

I have local Windows 10 and remote Ubuntu server.

I want to automate connection to server and write executable script witch connects by ssh to server and open new terminal from another server.

What it's supposed to look like

I double click on bat

enter image description here

And then script

  1. inits ssh connect
  2. writes password
  3. gives the user a terminal with a ready ssh connection.

That is, it mimics the following

enter image description here

Problems

  1. How to wait ssh password request? All commands executes immediately.
  2. (additional) can I write it in .sh script, run script, execute all in "start" terminal (from which I run .sh script) and then pass ssh control to invoked terminal?

It's best if someone writes a ready-made script

cheiser
  • 37
  • 6

1 Answers1

0

Automatically enter SSH password with script

Answers:

  1. Direct answer - use expects. But sshpass is better. Also RSA-key can be used.
  2. Can`t tell anything.
cheiser
  • 37
  • 6