FTP/SFTP without password
1. If you use sftp:ssh-keygen
<no passphrase>
ssh-copy-id your_login@remote.host
Now you can log in without password and use simple command in your script: sftp your_login@remote.host
2. If you use ftp:
touch ~/.netrc
echo "machine <remote_host> login <your_login> password <your_password>" > ~/.netrc
chmod 600 ~/.netrc
Now you can login in without password - ftp remote.host
Good blog post. i really like it.affordable sftp hosting
ReplyDelete