Red Hat: Error connecting using secure shell

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Red Hat: Error connecting using secure shell
# 1  
Old 06-12-2017
Red Hat: Error connecting using secure shell

Hi All,

I am getting below error when I try to connect with ssh. Not sure why the error is on.I am able to connect from a different login from the same server

Code:
(local: rhe/home/s3>) ssh  acces1@91.1.12.102
Connection closed by  91.1.12.102
(local: rhe/home/s3>)  ssh redhlinx102
Connection closed by   91.1.12.102

Below is what I am getting in debug mode

Quote:
debug1: Next authentication method: gssapi-with-mic
debug3: Trying to reverse map address 91.1.12.102
debug1: Unspecified GSS failure. Minor code may provide more information
Unknown code krb5 195

debug1: Unspecified GSS failure. Minor code may provide more information
Unknown code krb5 195

debug1: Unspecified GSS failure. Minor code may provide more information
Unknown code krb5 195

debug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
# 2  
Old 06-12-2017
Great. Look at the home and .ssh directories permissions (and acl's if any ) on the account that works - both local and remote. Make the one that fails match permissions exactly to the good account. Do that for key files as well. Keyfiles have to match ownership with the owner of the home directory.

This is the most common way to get and fix the result you see. There are lots of other ways things can get broken, but this will get you started. Next step is setting correct key files with correct permissions on key files in the .ssh directory for the bad account. Both servers. Remember, to login from a remote node the place that gets logged into has to have the correct keys from the incoming site in the user's .ssh directory.

See if that will get you going. If not, check back here.
# 3  
Old 06-12-2017
I compared all the permission with home and ssh directory all are same. I tried to do on a different server . I got below error. Not sure why on the other machine I am getting connection refused. It should show ask for password atleast.

Code:
(prod: rhe/home/ps3>)  ssh redhlinx102
ps3@redhlinx102's password:

# 4  
Old 06-12-2017
On the remote box:
is there an entry in sshd_config: UsePAM yes If so,
Then is there an entry for the user that cannot connect? in /etc/security/access.conf
This typically disables local logins but with ssh it will disable network as well, I believe.

It looks like net login is disabled for that particular user. I do not know how that would have been setup based on what you said so far.

When you are already logged into the remote box with an account that works, can you use either su - baduser or do a console connect and login (not a network login)?
The user may not even be able to login locally.
This User Gave Thanks to jim mcnamara For This Post:
# 5  
Old 06-12-2017
Yes I am able to login with the user id to remote machine . Also only this user that is getting me

Quote:
Connection closed by 91.1.12.102
I tried to do ssh with dummy users it prompted me for password


Code:
ssh acces1@91.1.12.102
Connection closed by 91.1.12.102

ssh test@91.1.12.102
test@91.1.12.102's password:


ssh ttt@91.1.12.102
ttt@91.1.12.102's password:


I just looked and find when I type users in the remote machine I am not able to find the one user I am looking . will that be a reason ?. However I am able to sudo to the user

---------- Post updated at 07:38 AM ---------- Previous update was at 12:38 AM ----------

Other things noted:

When I changed the authorized_keys to chmod 777 the ssh prompted me to enter the password. When I make it as chmod 700 ssh showed below error

Quote:
Connection closed by 91.1.12.102

Last edited by arunkumar_mca; 06-12-2017 at 04:15 PM..
# 6  
Old 06-12-2017
If you are using keys, the permissions for the remote account should be as follows:

$HOME
directory should not be writable by others
.ssh should be 700
authorized_keys should be 600
# 7  
Old 06-13-2017
Thanks. I made the permissions as mentioned and I got the below error

Quote:
Connection closed by 91.1.12.102
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Red Hat and Ubuntu shell scripting

Are basic scripts in awk or bash or perl or other shell scripting languages the same in RHEL red hat as ubuntu? (1 Reply)
Discussion started by: cmccabe
1 Replies

2. Linux

Error on smbclient login on Red Hat

I have the smbclient installed and I am able to see information from the '-L' option. But when I attempt to login I'm getting the "NT_STATUS_BAD_NETWORK_NAME". I was hoping for help, because I'm not sure what is supposed to go into the smb.conf file. My goal is to transfer files from my Linux... (2 Replies)
Discussion started by: islanderman
2 Replies

3. Red Hat

collect red hat linux error logs

Hi, I have two questions,first of all is where can I collect more error logs(the log under /var/log/messages), also give the corresponding explain is grateful.The second one is the log under various versions(such as red hat,suse,etc) is the same or not. Thanks for answers. (1 Reply)
Discussion started by: zhaoyy
1 Replies

4. Red Hat

Oracle Listener Error on Red hat 5

Hello everybody, the reason why im posting this thread is because i've installed an oracle test database on RHEL 5, on a localhost (Since it is for test)... the thing is, after i have installed the DB it works just fine, but after i re start it, i get the following errors when i want to go into the... (5 Replies)
Discussion started by: blacksteel1988
5 Replies

5. Shell Programming and Scripting

Shell scripts migration from HP-Unix 11 to Red Hat Linux

We are changing our OS from HP-Unix 11 to Linux Red Hat. We have few k- shell, c - shell and sql scripts which are currently running under HP-Unix 11. Will these scripts work on LINUX as it is? or we need to do any code changes?IS there anyone who have done this kind of migration before?Thanks for... (2 Replies)
Discussion started by: Phoenix2
2 Replies

6. Red Hat

Buffer I/O error in red hat linux boot up

I get error message when boot up red hat linux Buffer I/O error on device hdc ,logical block XX ... /dev/hdc:read failed after 0 of 2048 at 0 : input/output error ..... I paste the /etc/fstab file in here /dev/hdc is cdrom How can I fix it Please advice # cat /etc/fstab # This file... (3 Replies)
Discussion started by: chuikingman
3 Replies

7. Linux

red hat check error log

Hi All, Where should start checking error on red hat? I want to check error on system, paging, memory, pci, external storage, etc. I few advise will do and highly appreciated. Thanks, itik (3 Replies)
Discussion started by: itik
3 Replies

8. Shell Programming and Scripting

telnet shell script on red hat 9 cmd line only

i would like to make a shell script (red hat 9 cmd line only) to telnet to my local isp's webmail server on port 25 and send it commands such as helo :) help would be much appreciated, and i found no posts similar that answered my question... the closest i've gotten to an answer from about 8... (3 Replies)
Discussion started by: kypeswith
3 Replies

9. UNIX for Dummies Questions & Answers

Red Hat shell

Good morning. I am using RedHat shell. when running the .out file of a program I wrote, I cannot see a terminal with the outputs. I know that the program runs, because the files to be changed are changed. how can I see the terminal (As I see it in windows)? Thanks, Ido. (2 Replies)
Discussion started by: ginodii
2 Replies
Login or Register to Ask a Question