Another SSH help needed


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Another SSH help needed
# 1  
Old 05-24-2002
Question Another SSH help needed

Hi all...

After doing a
$ ssh server uname

I get the following:

ssh_exchange_identification: Connection closed by remote host

I have never seen this before...What does this mean?

Thanx

Jason
penguin-friend
# 2  
Old 05-24-2002
Try this - got it from snailbook.com

Your version may be different or it may be different on your OS (which you didn't post)

My SSH client connects, but the server seems to immediately close the connection. I get "connection closed" or "connection lost," or with OpenSSH:
ssh_exchange_identification: Connection closed by remote host


--------------------------------------------------------------------------------
This message means that the client got a TCP connection to the server, but the server immediately closed it before the SSH protocol could get started (the ssh_exchange_identification routine implements the version string exchange, the initial step of the protocol).
This usually happens because of a libwrap setting which prohibits the connection. Check the server log; if this is the problem, you will see messages like these:

SSH1, OpenSSH sshd1[15092]: refused connect from 192.168.10.1
SSH2 sshd2[15085]: Denied connection from by 192.168.10.1 tcp wrappers.
If you compiled the SSH server with libwrap (TCP-wrappers) support, check that the rules in the files /etc/hosts.{allow,deny} on the server host allow connection to the SSH daemon. An entry like this, for example, will allow connections to sshd from any source address:
sshd sshd1 sshd2 : ALL : ALLOW

The name on the left must be the argv[0] value of the running daemon, so if you've invoked sshd under another name, you'll need to use that. Also, the rules are order-dependent, so the rule just given might not work, depending on the other rules and their relative placement. See the hosts_access(5) man page for details on the libwrap rule syntax and semantics.
thehoghunter
# 3  
Old 05-24-2002
OK! THANX!

This helped me...
I also found out that the server in question denies almost all remote connections, except console... That was my problem...

Thanx anyways...

Cheers
Jason
penguin-friend
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find active SSH servers w/ ssh keys on LAN

Hi, I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step: #!/bin/bash # LAN SSH KEYS DISCOVERY SCRIPT </etc/passwd \ grep /bin/bash | cut -d: -f6 | sudo xargs -i -- sh -c ' && cat... (11 Replies)
Discussion started by: syrius
11 Replies

2. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

Hi, I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not... I have .sh script like below and i have servers.txt contains all the list of servers #/bin/bash for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies

3. Shell Programming and Scripting

Help needed on ssh in bash scripting

HI I have the following requirement I have a script a.sh which will deploy files in multiple servers .The argument for the a.sh is abc.gz host1.conf where abc.gz is a zip file and one.conf will contain all the database connection string . Now I have to write a b.sh which will... (7 Replies)
Discussion started by: harry00514
7 Replies

4. Shell Programming and Scripting

Check if file exists via ssh in ssh (nested)

I'm using redhat and have an odd issue with a nested ssh call. ssh -i ~/.ssh/transfer-key -q transfer@fserver1 ] && ssh -i ~/.ssh/transfer-key transfer@fserver1 "ssh -i ~/.ssh/sftp-key sftpin@10.0.0.1 ]" && ssh -i ~/.ssh/transfer-key transfer@fserver1 "scp -i ~/.ssh/sftp-key /home/S/outbox/*... (2 Replies)
Discussion started by: say170
2 Replies

5. Cybersecurity

Best, secure way to ssh without needed password?

Hi, Wondering if anyone could suggest the best way to complete this. I have a remote server that hosts a forum what i want to finish configuring my monitoring via Nagios. now because my home network uses a Dynamic IP nagios fails to work once the IP changes. Another way to run the checks... (1 Reply)
Discussion started by: springs2
1 Replies

6. Shell Programming and Scripting

Ssh = ssh expect and keep everything not change include parameter postion

I have write a script which contains ssh -p 12345 dcplatform@10.125.42.50 ssh 127.0.0.1 -p 5555 "$CMD" ssh root@$GUEST_IP "$CMD" before I use public key, it works well, now I want to change to "expect", BUT I don't want to change above code and "parameter position" I can post a... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

7. Shell Programming and Scripting

ssh execution help needed.

I m writing a program to execute remote script . (display remote file content) Whenever i execute following statement it gives me an error. $command="cat /root/vm.cfg" ssh -ttq root@10.180.8.236 $command However following script work find. ssh -ttq root@10.180.8.236 cat /root/vm.cfg ... (8 Replies)
Discussion started by: pinga123
8 Replies

8. Shell Programming and Scripting

could not send commands SSH session with Net::SSH::Expect

I am using Net::SSH::Expect to connect to the device(iLO) with SSH. After the $ssh->login() I'm able to view the prompt, but not able to send any coommands. With the putty I can connect to the device and execute the commands without any issues. Here is the sample script my $ssh =... (0 Replies)
Discussion started by: hansini
0 Replies

9. Shell Programming and Scripting

connecting servers using SSH - help needed

Hi all, I have a script written successfully and tuned by our members, now I am trying to execute this script from a taxi server. My aim is I want to connect to four servers via ssh where I want to ran a script or run some commands and write the output to a file in the Taxi server. I... (12 Replies)
Discussion started by: senthilkumar_ak
12 Replies
Login or Register to Ask a Question