![]() |
SSH and autologin?
Here's my situation. My server is Redhat 8. I use Mac OS X via the terminal to connect using ssh to the server. Now, is there anyway to have it just login and not as for a password when I use:
ssh -l default 192.168.1.3 ? It always comes back asking for a password. I would like a way around that and have it so that i just gives me the command prompt of the redhat server and never ask for a password. I did read about using public and private keys but got lost :confused:. Can anyone help me here? |
Thats a good thing. You don't want to disable a password, especially for ssh and other remote connection software, since thats a major security problem.
|
Quote:
|
Overall, you'd probably be better off just writing a php script that parses the log you're trying to check on.
|
You can use ssh-keygen to generate public and private keys. The public key you will want to paste to the know_hosts file in your ~/.ssh/ directory on the server. Also look into .shost file
|
Quote:
|
1. run ssh-agent to start a shell for ssh-keygen
2.run ssh-keygen to generate the needed keys 3. copy the users public key to the authorized_keys file of the remote machine (authorized_keys2 if using ssh protocol 2) Thats it. Your user should be able to log into the remote machine without passwords. You can also run programs on the remote machine just by doing: ssh machine.mynet.com programname Key authentication is pretty safe as long as the actual keys are safe. No passwords flying around the net for one thing, nothing to sniff :) any questions? If your reading a specific howto and getting lost, where is it and where are you getting lost? |
Quote:
Quote:
Thanks for your help. This is exactly what I was looking for :-) |
Quote:
The user has to be the same on both machines. Lets say the user is gbush. The public key generated would go into the /home/gbush/.ssh/authorized_keys file on the remote machine. Now gbush can log into the remote machine without a password. Be careful copying the keys to the remote machine if you get a line break in them they wont work. |
| All times are GMT -5. The time now is 10:53 AM. |