The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
On ROWNUM and Limiting Results iBot Oracle Updates (RSS) 0 04-06-2008 06:10 AM
limiting failed logins to three csaunders HP-UX 1 10-18-2007 10:56 AM
arrow keys / special keys raguramtgr UNIX for Dummies Questions & Answers 3 02-20-2004 02:45 AM
question about limiting the display from the ls command Aesop UNIX for Dummies Questions & Answers 4 09-06-2003 10:41 PM
Limiting access misha UNIX for Dummies Questions & Answers 4 02-24-2001 07:25 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-28-2008
moomain moomain is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 1
SSH keys and command limiting ...

Hi, I've just been trying to setup so that server1 can ssh into server2 and execute a limited set of commands only without password login. I want it also to be able to login with a password if no command given at all though (bit I'm stuck on).

I have got this almost working with authorized_keys and

from="hostofserver1",command="/pathtocomandstocheck.sh" rest of key> in authorized_keys file.

This all works fine, so I can "ssh server2 ls" and all works fine (as I have allowed ls in the script). If I enter a wrong command it doesn't do anything and kicks me out. So far so good.

Only problem is that with that key/entry in place, I can no longer login to the box normally if wanted with a normal password.

So I want to be able to "ssh server1 ls" checks keys and it works, no password needed. Or just "ssh server1" and it asks for a password, and assuming correct gives me a shell.

Any ideas, just the last bit I'm stuck on.

Thanks in advance.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0