I need to programmatically upload and download files via an sftp connection to a remote server. My username has permission to access a certain remote directory through a password, but not the .ssh directory. Actually I cannot ssh into the remote server at all. I get the response:
This service allows sftp connections only.
Connection to www.example.com closed.
But for the purpose of this question, lets say I simply don't have the permission to copy my private key into the remote .ssh directory. So my question is:
How can I configure my local /.ssh/config file, to avoid being prompted for the password authentication?
Obviously I cannot copy a newly generated key-pair to the remote directory, as is suggested here, for the abovementioned reasons. But I must have a private key on my local machine for the ssh connection somwhere, right? Can I not simply pass the directory of that file to the IdentityFile option?