Do we have option on PuTTY command line to send RSA hostkey as an argument similar to WinSCP -hostkey
.?
PuTTY command currently used:
putty.exe -ssh -l username -pw password -m command.txt RemoteServerIP
Is there a option like WinSCP where RSA hostkey can be passed just like below:
open sftp://username :password@RemoteServerIP/ -hostkey="ssh-rsa 2048 11:2c:5d:f5:22:22:ab:12:3a:be:37:1c:cd:f6:13:d1"
Also let me know, if my option of using PuTTY for this task is a bad option.
Detailed explanation for those who are interested to know entire background:
I have developed a Django application to kick off some remote scripts and get the task done. This uses putty ssh to run commands at the background using subprocess module, parameters are passed from the Djangofront end.
Problem I am facing is, There are multiple users who will use this application to kick off their scripts. Only requirement is they have to store IP address and RSA key of the server on a config file on Django Server.
Since all of the servers use RSA key, for the first login it asks to confirm the RSA fingerprint storage prompt.
Usually when we kick off this manually from our local machine we give Yes, for the first time. and subsequent runs it won't ask for the confirmation.
Since these scripts will be running from a DjangoServer where users won't have access, is there a way I can still be able to run the remote scripts using putty?
Please note I am aware of kicking off script using WinSCP but unfortunately in our environment I cannot kickoff Scripts from WinSCP, but I can FTP using WinSCP and I use hostkey option so it does not prompt for confirmation