Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-12-2007, 06:47 AM   #1
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, 06:57 AM   #2
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:
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:
-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, 07:14 AM   #3
LQ Newbie
Registered: Nov 2007
Posts: 11

Original Poster
Rep: Reputation: 0

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


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

All times are GMT -5. The time now is 01:05 PM.

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