remote backup via telnet or ssh?

Hi I'd like know how to remotely backup my files via telnet or ssh? I am a super noob, just installed FreeBSD and working my way around it. I know one for ssh but it requires password which is not good when automating the task. Here's the command:

# tar zcvf - /wwwdata | ssh root@www.nothing.com "cat > /backup/wwwdata.tar.gz"

Anyone know how to modify this so it would autologin?

As for telnet, how? I haven't found how to for it.. Pls help...
 
i don't get it, I have changed the permission of the authorized_keys to 777 so I can write into it. After succeeding, I am still asked for a password when I login to the server.. Any idea???
 
authorized_keys needs to be rw------- (perms 600), and the .ssh/ directory needs to be rwx------ (perms 700). IOW, only the specified user can read that file.

You really don't want to be doing this as root, by the way. Use a normal user account, one that is *only* used for the purpose of transfering the backups. Don't make this user part of wheel. Don't make this user with sudo permissions. And only give it write permissions to the directory where you will be storing the backups.

If possible, consider using security/scponly, so that the backups user doesn't even have a login, and can only use the scp command to transfer the backups from the client to the remote server.
 
You need to activate the support for PKI in you sshd_config on the server.

Code:
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
 
potobenka said:
hi just followed the tutorial. However when try to copy the key using a wheel user of the server,
Do NOT use root or any other wheel user for this. Create a backup user and set up ssh public/private key authentication. Use that account the ssh the data.
 
Back
Top