LinuxQuestions.org
Visit Jeremy's Blog.
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 11-12-2007, 05:47 AM   #1
Abstractt
LQ Newbie
 
Registered: Nov 2007
Posts: 11

Rep: Reputation: 0
SSH command, permission denied


Hi Everyone,

Friday we had a little problem at our server. I was forced to call in the help of Tech support, because our sysadmin is away for a week.

This Tech support has screwed up the ssh command on this server. Whenever i try to connect with ssh to one of our other servers, I get an error message: "bash: /usr/bin/ssh: Permission denied"

It does not matter which user I use, I even tried as root user, but every time I haven't got the permission to execute it.

I can't even execute the help file 'ssh --help'. I think it's rather easy to solve, but I don't know how

Thanks Arian
 
Old 11-12-2007, 05:57 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Check the permissions of the ssh command itself:
Code:
ls -l /usr/bin/ssh
-rwxr-xr-x 1 root root 311216 2007-10-17 20:05 /usr/bin/ssh
You may have rwx----- permissions.


Another potential gotcha is the permissions of your private key:
Code:
-rw------- 1 jschiwal jschiwal 1675 2007-11-11 21:07 id_rsa
ssh will refuse to run if anyone else could read the file.
Given that "ssh --help" gives you a permission error, it sounds like the permissions on the ssh client (/usr/sbin/ssh) are wrong rather than an authentication problem.

Also, since the error message comes from bash rather than ssh or PAM, this also indicates a permission problem with the /usr/bin/ssh file.
 
Old 11-12-2007, 06:14 AM   #3
Abstractt
LQ Newbie
 
Registered: Nov 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Fixed

You're right, this was the problem. I chmod the command and it's working now. Thanks
 
  


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 login error : Permission denied, please try again powah Linux - Security 3 07-12-2007 12:32 AM
SSH: Permission denied, please try again. sanatox Linux - Security 3 01-15-2007 09:47 PM
ssh -Permission denied zaphod_es Linux - Networking 4 05-21-2006 01:56 PM
SSH permission denied on Mandriva 2006 EvilAngel Mandriva 7 03-23-2006 10:44 PM
SSH Permission Denied Chimney Linux - Security 1 11-10-2005 06:01 PM

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

All times are GMT -5. The time now is 06:26 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
Open Source Consulting | Domain Registration