Może dokładniej:
strona www.putty.nl tam w sekcji download jest program plink.exe
komenda do wywołania plink start >uruchom
dysk:\sciezka\do\plink.exe -P 22 zas.pl (każdy może spróbować dane są rzeczywiste)
wywołuje się shell (cmd)komenda daje taki komunikat:
The server's host key is not cached. You have no guarantee
that the server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 53:ef:df:6c:ad:f2:93:d0:92:58:23:27:44:9f:07:d3
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n)
W tym dokładnie miejscu potrzebuję odpowiedzieć y lub n z klawiatury.
Uruchomienie za pomocą Runtime.getRuntime().exec("cmd.exe plink.exe -P 22 zas.pl"); powoduje uruchomienie pliku jako procesu (nie wyświetla okna) i nie wiem jak dostać się do procesu by mu odpowiedzieć (interesuje mnie odpowiedz najlepiej "n" - wówczas klucz się nie dodaje).