System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

SSH access deny error while connecting

 
shikhar_1
Regular Advisor

SSH access deny error while connecting

Hi All,

I have installed fresh OS 11. ver 3 on rx2660 integrity server. Now i am facing problem with ssh connection from remote.Once the connection has been established its not accepting the password and throwing the error "access denied".
Although i am able to login through telnet.
Appreaciting your response.
13 REPLIES
Shibin_2
Honored Contributor

Re: SSH access deny error while connecting

Your ssh daemon running? Is it listening to port 22 ?
Regards
Shibin
shikhar_1
Regular Advisor

Re: SSH access deny error while connecting

Yes its running.

ps -eaf | grep -i sshd
root 11037 1 0 12:33:20 ? 0:00 /opt/ssh/sbin/sshd
root 11333 10689 0 13:01:17 pts/ta 0:00 grep -i sshd

Do we need to some changes on sshd_config file?
kemo
Trusted Contributor

Re: SSH access deny error while connecting

are you trying to login using root ?
if yes make sure you have this directive enabled in sshd_config file

PermitRootLogin yes

thanks
sarfaraj ahmad
Trusted Contributor

Re: SSH access deny error while connecting

Hi Shikhar,

please check "PermitRootLogin" parameter setting in /opt/ssh/etc/sshd_config File.

it should like below,
"PermitRootLogin yes"

then stop and start ssh service as below,

Stop HP UX SSH Service
# /sbin/init.d/secsh stop

Start HP UX SSH Service
# /sbin/init.d/secsh start

Then try to ssh in this server.

Thanks,
sarfaraj
shikhar_1
Regular Advisor

Re: SSH access deny error while connecting

Hi,
Thanks for your reply.

I have already done whatever u told me but still i am unable to login to my server from remote. Although i am able to login through telnet.
I have attached the configuration file (sshd_config) and all the errors also.

Pls reply..
Venkatesan_5
Frequent Advisor

Re: SSH access deny error while connecting

Check the permissions of the user's home folder, its parent folder and .ssh folder beneath it. please paste the output here.

execute ls -ld command and paste it please.
shikhar_1
Regular Advisor

Re: SSH access deny error while connecting

drwxr-xr-x 6 root root 96 Jan 21 18:18 home
# cd /home
# ls -ld
drwxr-xr-x 6 root root 96 Jan 21 18:18 .
shikhar_1
Regular Advisor

Re: SSH access deny error while connecting

One interesting thing is that when i am trying to loign through telnet with another user. Its logged in but its home directory is not creating in home rather it is root only..

HP-UX SEZ_HPRX B.11.31 U ia64 (tc)

login: shikhar
Password:

(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2006 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.

Confidential computer software. Valid license from HP required for
possession, use or copying. Consistent with FAR 12.211 and 12.212,
Commercial Computer Software, Computer Software Documentation, and
Technical Data for Commercial Items are licensed to the U.S. Government
under vendor's standard commercial license.

$ pwd
/
$ ls -ltr
total 1184
drwxr-xr-x 2 root root 96 Jan 21 16:45 lost+found
lr-xr-xr-x 1 bin bin 8 Jan 21 17:03 bin -> /usr/bin
lr-xr-xr-x 1 bin bin 8 Jan 21 17:03 lib -> /usr/lib
dr-xr-xr-x 22 bin bin 8192 Jan 21 18:15 usr
dr-xr-xr-x 81 bin bin 8192 Jan 21 18:19 opt
dr-xr-xr-x 13 bin bin 8192 Jan 21 18:47 sbin
dr-xr-xr-x 26 bin bin 8192 Jan 21 18:48 var
dr-xr-xr-x 1 root root 1 Jan 24 16:52 net
dr-xr-xr-x 8 bin bin 8192 Jan 24 16:52 stand
dr-xr-xr-x 17 bin bin 8192 Jan 24 16:53 dev
drwxr-xr-x 3 root root 96 Jan 25 14:04 BL_Softwares
-rw------- 1 root sys 530992 Jan 25 15:50 core
drwxrwxrwt 5 root root 8192 Jan 25 16:27 tmp
-rw-rw-rw- 1 root sys 24 Jan 25 16:35 test
drwxrwxrwx 7 root root 96 Jan 25 17:01 home
dr-xr-xr-x 36 bin bin 8192 Jan 25 17:06 etc
$
Venkatesan_5
Frequent Advisor

Re: SSH access deny error while connecting

Hi Shikhar,
Please paste the passwd file entries of the user 'shikhar'

Do you have a .ssh folder beneath your home folder?

let us know...
shikhar_1
Regular Advisor

Re: SSH access deny error while connecting

Hi,

Now i am able to login with ssh and telnet but its for root user only.I am not able to login with other users.

I have created three users as shown below:

shikhar:Z/D.dhvgmXaTY:108:20::/home/shikhar:/sbin/sh
test1:PdNo7FFlgHoiI:109:20::/home/test1:/sbin/sh
test2:r.VF0vPtfXS6g:110:20::/home/test2:/sbin/sh
sarfaraj ahmad
Trusted Contributor

Re: SSH access deny error while connecting

>>Now i am able to login with ssh and telnet but its for root user only.

==>> what changes you made so able to login through ssh by root?

what happening if you login with other users locally on same machine? are they going in their home directory or in / ?
shikhar_1
Regular Advisor

Re: SSH access deny error while connecting

Actually i just changed my root passwd with using alpha-numeric and atleast one capital words earlier i was using simple password, after that i was able to login with ssh as root but still i m unable to login.
shikhar_1
Regular Advisor

Re: SSH access deny error while connecting

Now i am able to login with root as ssh but still unable to login with other users.
Appreciating your response.