I cant scp, the other server only takes sftp connections.
Currently, I am trying to do
sftp jay@server.name.com:/files> put -r ~/
-i keyname does not work, just resolves with illegal option -- i.
|
I cant scp, the other server only takes sftp connections. Currently, I am trying to do
|
|||
|
|
|
Try:
You can use |
|||||
|
|
If you are looking to setup sftp on ec2, this article might help |
|||
|
|
|
Copy your PUBLIC key to the server using traditional means. On server:
[[ ! -d "${HOME}/.ssh" ]] && mkdir -p "${HOME}/.ssh"
cat /path/to/public_key.pub >> "${HOME}/.ssh/authorized_keys"
chmod go-rwx "${HOME}" "${HOME}/.ssh/authorized_keys"
After that, you should be able to log in from the client using the PRIVATE key. To automate a transfer, you want to use a batch file, which is just a text file containing a list of commands to execute. echo "put filename.foo /safe/path/filename.foo" >> /tmp/batchfile.txt sftp -b /tmp/batchfile.txt -oIdentifyFile=/path/to/private_key user@host Alternatively, feel free to create a ~/.ssh/config file in ssh_config format so you can just type this in the future: sftp -b /tmp/batchfile.txt host Sample contents of
Host the_hostname
User user_name
IdentityFile /path/to/private_key
|
|||
|
|