Passwordless Logins over ssh PDF Print E-mail
Written by tek   
Wednesday, 16 April 2008 20:37
I wrote this up for the documentation on a mysql backup script i wrote called MySQL SaviorĀ  tthat can do several things. It can backup up your mysql database and email it off to you. It can also be setup via scp to transfer really large backups to a remote server via ssh using passwordless logins. Here is how you can setup ssh keys for passwordless logins.

 

If your using rsa instead of dsa just modify all occurances of dsa with rsa $ mkdir ~/.ssh/ $ cd ~/.ssh/ $ ssh-keygen -t dsa $ cat ~/.ssh/id_dsa.pub | ssh This e-mail address is being protected from spambots. You need JavaScript enabled to view it "cat - >> ~/.ssh/authorized_keys" The server example.com is the server we are transferring your backups to. For easy ssh use you can chose not to use a passphrase with your key or use an agent to keep authenticated. Otherwise each transaction between the user machine and the server your transferring your backups to will require the user to enter a password (very inconvenient). Using an agent can be done like this: $ ssh-agent $ ssh-add $ ssh This e-mail address is being protected from spambots. You need JavaScript enabled to view it That should get scp transfers working.

 

Last Updated on Tuesday, 01 July 2008 06:47
 

Who's Online

We have 36 guests online

Polls

Why did you start using Linux
 
Pervasive Netwerks - Webdesign and Hosting Services