I'm writing a script to do a
sftp to Windows (Server) from a Linux machine. I wanted the script to run without manual inputs like inputting password etc.
#!/bin/sh HOST='10.x.x.x' USER='user' PASSWD='passwd' sftp $USER@$HOST
I'm using freeftpd as a SFTP server on the Windows machine. From the Linux end as of now I'm using Ubuntu but my actual requirement will be for a stripped down version of Linux for an ARM based machine.
From the Linux machine I'm generating public and private keys using
ssh-keygen -t rsa. Two files (public and private) get generated under the
/home/user/.ssh directory, i.e.
If its another Linux machine I'm aware that I have to append the public key (
id_rsa.pub) to the
I'm not sure now, since my SFTP server is on Windows. After installing freeFTPd I checked in
C:\Program Files\freeFTPd\ , but I dont see any files resembling
.ssh/authorized_keys as in Linux.
FreeFTPd has the option to generate a private key. So I generated one and copied the same to the Linux machine (
.ssh/id_rsa) file and tried . But it still prompts for password.
How can I solve this.