Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I run Fedora Core 3 with SELinux passive, and I am trying to do an RSA key SSH to root. (I know, I know - bad idea) - reason being I need to perform commands in PHP as root, which can't be done without SSHing to root in one command blah blah blah...anywho...I can easily authenticate any other user on the system...cept root. I had it working at one time...then it died - I think it could have something to do with the /etc/hosts file being modified. I don't know...any ideas?
If you change the hostname or make other changes, attempts to ssh into that machine may fail with a spooky message along the lines of somebody may be doing something bad....
You can get a fresh start by removing the hidden .ssh file in the users home directory ( root in this case ) .
well there can be any of the following reasons. check each one thoroughly.
1> ssh on remote server doesn't allow direct root logins.
check the /etc/ssh/sshd_config on remote box and see if PermitRootLogin is set to YES(allow) or NO(disallow).
2> if possibly the ip or hostname of remote server has changed the you need to remove the line corresponding to the old ip or hostname in ur ~/.ssh/known_hosts file ,save it and then do a fresh ssh to the remote box.
3> analyse your network traffic using tethereal for some potential traffic sniffer and the port and shut down the service on that port.
reason being I need to perform commands in PHP as root, which can't be done without SSHing to root in one command blah blah blah...
May I strongly suggest that you investigate sudo, which would allow your PHP script to run the commands specified by you with root permissions. Without having to log in as root. You can even set it up to not require a password.
sudo is also a good option.
but for that matter you can also configure raw ssh not to prompt you for login.
this needs you to generate a public key and a private key using sshkeygen and post the public key to remote box and place private key on ur box.
This is precisely what i do in my automated php and perl scripts that run through cron.
sudo is also a good option.
but for that matter you can also configure raw ssh not to prompt you for login.
this needs you to generate a public key and a private key using sshkeygen and post the public key to remote box and place private key on ur box.
This is precisely what i do in my automated php and perl scripts that run through cron.
do let me klnow if you need details.
Hi vireshwali,
Browse through this post, if you don't mind to share in detail the steps needed??
hi,
the trick here is to crack ssh well before it goes into keyboard interactive mode.
try ssh -v root@hostname and see the output. We need to crack it when it is trying at a public/private key match.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.