LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-06-2008, 12:07 AM   #1
jtbinuya
LQ Newbie
 
Registered: Aug 2007
Posts: 11

Rep: Reputation: 0
need help on SSH logging


This is my problem.

I'm making a menu for our system operators to stop/start some java applications. The problem is the java applications can only be stopped/start using the root account. So I tried to use ssh -l root <server> <command> on the script that the menu calls, but the system asks for the root password. I already created the authorized_keys for root account and placed it on the home directory of root on the server; in this case /root/.ssh/authorized_keys. But I just can't ssh as root to the server. Can anyone tell me what I'm doing wrong.

To be clear on this,

I am sysops account logged in to server x and I am going to ssh -l root server x <command>

Thanks in advance.
 
Old 06-06-2008, 03:09 AM   #2
jtbinuya
LQ Newbie
 
Registered: Aug 2007
Posts: 11

Original Poster
Rep: Reputation: 0
problem is creating new rsa pub key using the user account

I tried this problem using another approach.

- I logged in using the sysops account.
- ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sysops/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sysops/.ssh/id_rsa.
Your public key has been saved in /home/sysops/.ssh/id_rsa.pub.
The key fingerprint is:
############################################## sysops@campsmart03
- cat id_rsa.pub >> authorized_keys (~sysops/.ssh)
- chmod 600 id_rsa.pub
- ssh campsmart03 hostname
campsmart03
- cat id_rsa.pub >> ~/.ssh/authorized_keys (~/.ssh)
- su sysops
- ssh -l root campsmart03 hostname
campsmart03

Success!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh command logging jcookeman Linux - Security 3 08-26-2008 02:50 AM
[SSH] Issue logging in [SSH & Permissions] MD3 Linux - Networking 11 12-10-2006 09:25 AM
SSH - Logging out r4merlin Linux - Networking 1 11-02-2003 12:50 PM
logging onto SSH robmainella Linux - Newbie 5 08-26-2003 02:21 PM
problem logging in with ssh FireAge Linux - Networking 4 07-03-2002 06:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration