What I am doing currently-
- Execute the shell script on
MachineB
fromMachineA
(Windows Environment). - Then wait for the shell script to complete its task, in my case it will write the output to a text file.
-
And after the shell script has completed all its task means it finished writing everything to a txt file, then copy that txt file to
MachineA
(Windows Environment) fromMachineB
.
So for this I wrote a Windows Batch file
that will do the above task and it is working fine for me. Below is the Windows Bat file that I am using currently.
plink uname@machineB -m email.sh
pscp uname@machineB:/export/home/uname/jk_attachment22.txt C:\PLINK\foo.txt
But by using the above windows batch file, I need to type password two times which is pain, Firstly I need to type for the first line and then again for the second line.
My Question is-
So Is there any way I can run the above windows batch file by just typing password
once at the command prompt. Any suggestions will be appreciated.
This is what I have when I was looking for /.ssh folder
.
Update:
bash-3.00$ cd ~/.ssh
bash-3.00$ pwd
/home/uname/.ssh
bash-3.00$ ls -lt
total 2
-rw-r--r-- 1 uname gid-uname 489 Jul 26 18:55 known_hosts
So I need to make some other changes here?