LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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, 01:07 AM   #1
jtbinuya
LQ Newbie
 
Registered: Aug 2007
Posts: 10

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, 04:09 AM   #2
jtbinuya
LQ Newbie
 
Registered: Aug 2007
Posts: 10

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:50 AM
[SSH] Issue logging in [SSH & Permissions] MD3 Linux - Networking 11 12-10-2006 10:25 AM
SSH - Logging out r4merlin Linux - Networking 1 11-02-2003 01:50 PM
logging onto SSH robmainella Linux - Newbie 5 08-26-2003 03:21 PM
problem logging in with ssh FireAge Linux - Networking 4 07-03-2002 07:24 PM


All times are GMT -5. The time now is 04:47 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration