1

I need to do SSH twice:

ssh myname@server1

and later

ssh myname@server2

and later I would like to execute a few Bash commands on server2, like e.g. htop.

I need all of it to run when clicking PuTTY shortcut. Is it possible? How to do it in a way it will not promt for a password?

Alex
  • 11
  • 2

2 Answers2

1

One option is MTPutty. It is a free program that can use Putty in multiple tabs and can run scripts:

Automation (from this page): Can automatically login the remote servers and "type" your passwords. Can run any script after login. Can "type" a script in several PuTTY tabs simultaneously.

DDiamond
  • 216
  • 2
  • 10
0

Take a look on this topic: https://superuser.com/questions/587629/how-to-run-a-remote-command-in-putty-after-login-keep-the-shell-running

And this for call command via ssh:

https://www.cyberciti.biz/faq/unix-linux-execute-command-using-ssh/amp/

For login without password, use ssh-keys.

rah606
  • 1
  • 1