0
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. id_rsa
and id_rsa.pub
.
If its another Linux machine I'm aware that I have to append the public key (id_rsa.pub
) to the authorized_keys
file.
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.
Your question is about FreeFTPd, which is a Windows program. The problem isn't making Linux interact with Windows, but about making Windows support a non-Unix-specific network protocol. So it is off-topic here. I've flagged it for migration to [su] (do not repost). – Gilles 'SO- stop being evil' – 2013-01-26T22:31:48.267