Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
i am trying to ssh into one of my servers without a password but it keeps asking me for a passwd
i have set it up on another server and it works fine but this paticular server seem not to work
i have installed openssh client and server,
its a fedora 8 box i have also changed the permissions to 600 on the authorized_keys
copied the id_rsa.pub across each server i can ssh from A to B but i cant ssh from B to A and i have dont the same thing on both i have also checked the sshd_config and its the same config on both
does any one know what can be the problem
Assuming you're following the basic documentation, for example the article in our LinuxAnswers subsite, then I find the most common gotcha is the permissions on the .ssh directory which should be 600 in order to work.
There are *MANY* perfectly good reasons to want to do this, and that is exactly why there are perfectly good methods to achieve exactly that.
Obviously the most basic part of a security policy is to say you must not use blank passwords or such like, but there are often exceptions to the norm, for example automated processes, which are totally valid points at which is it not feasible to enter a password, indeed would be less secure doing so than using a preshared key.
You have to setup the rsa key.
ssh-keygen.rsa command will create a certificate that you copy over using scp then u dont have to log in every time. this is a good idea if you are running backups or crontabs when you are not there to input passwords..
look in here for details; http://kimmo.suominen.com/docs/ssh/
oh BTW;
doing ssh via commandline (terminal) logs or tries to log you in as root user. you have to use another user in many cases because of the security then su or sudo. use -l (small L)like this; (suppose your username is user and that is the IP)
ssh -luser 192.168.1.2
this is for when you cant get in as root.
You have to setup the rsa key.
ssh-keygen.rsa command will create a certificate that you copy over using scp then u dont have to log in every time. this is a good idea if you are running backups or crontabs when you are not there to input passwords..
look in here for details; http://kimmo.suominen.com/docs/ssh/
Well he clearly already knows about this, as he's stating he copied the id_rsa.pub file.
Quote:
doing ssh via commandline (terminal) logs or tries to log you in as root user. you have to use another user in many cases because of the security then su or sudo. use -l (small L)like this; (suppose your username is user and that is the IP)
ssh -luser 192.168.1.2
this is for when you cant get in as root.
No it doesn't, it logs you in as the current user, and so if you are root already it will take that username along. In principle you should not run an ssh process as root in the first place, whether you specify a remote name or not. Certainly using PSK under root *is* nuts. If you are doing PSK for a cron job or something then you'd generally use a dedicated service account to achieve this.
No it doesn't, it logs you in as the current user, and so if you are root already it will take that username along. In principle you should not run an ssh process as root in the first place, whether you specify a remote name or not. Certainly using PSK under root *is* nuts. If you are doing PSK for a cron job or something then you'd generally use a dedicated service account to achieve this.
If you use GUI interface or PuTTY you have a choice of login in bcs it asks for login name but if you do straight ssh it always asks for password. I believe it is root's password because Linux does not assume all the users on all the systems are the same.
I mean you may be logged in as user10 here but you cant expect for the same user10 to exist on the other machine!
so -l allows you to log in with diff. name.
The cron jobs usually use nobody as user I think? I have seen that in scripts it doesnt really exist
BTW I had the same problem with 1 of my servers and I used that link above to fix it. best doc i have found on the subject...
No, as above it is the *current* username. It'd be ludicrous to try to log you in as root by default, especially as no well configured ssh server should ever permit a root login. If the user doesn't exist on the other machine then that's tough titties to you isn't it?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.