OK I am trying to use something similar to this:
#!/bin/sh
echo "OK, starting now..."
sftp -b /dev/fd/0 user@remotehost <<EOF
cd pub
ascii
put filename.txt
bye
EOF
only difference is the dir I need to cd to has a space in it like this
/Import/Server/Prospect File
, how do I deal with that?
Also I understand how to use ssh-keygen to generate a key pair and send them my public key. And if I was using scp I would use the -i option to direct scp to use the private id file on my end, but how do I do that with sftp? I have maned sftp and I don't see an option for designating an id file to use like "-i" in scp?