05-20-2008
I got a problem here
I removed the public key config on the ssh server and then tried
ssh root@$host "echo 2>&1" && echo "OK" || echo "NOK"
But it came out asking password . which I dont want , what I wanted is even if its asked passwd its should come out with a non-zero exit satus.
--------------------------------------------------------------------
Now let say how I got it implemented , even though a twisted way
if [ -f $HOME/.ssh2/ssh2_config ]
then
mv $HOME/.ssh2/ssh2_config $HOME/.ssh2/ssh2_config.bkp
echo "QuietMode yes\nBatchMode yes\nConnectTimeout 4" > $HOME/.ssh2/ssh2_config
else
echo "QuietMode yes\nBatchMode yes\nConnectTimeout 4" > $HOME/.ssh2/ssh2_config
fi
ssh -l root $R_HOSTNAME "date" > /dev/null
CONN_STATUS=$?
And if the RC is 66 , then it mean it had asked passwd and not got passwd within in the timeout period. Andas usual 0 as success.
10 More Discussions You Might Find Interesting
1. IP Networking
Hi,
I am having a problem with our AIX 4.3.3 Server accessing FTP. The error is " Connection Closed By Remote Host".
Scenario:
Since i put a default gateway on the server FTP connection is having a problem but when i remove the default gateway it will works fine..
Is there any way not... (1 Reply)
Discussion started by: mouglybean
1 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
Can anyone tell/guide me how to check remote host is up/running using bash script?
Thanks.
Zulfiqar (5 Replies)
Discussion started by: zulfikarmd
5 Replies
3. Shell Programming and Scripting
hi
i am trying to connect the frontend server using ssh
i got the following error
ssh_exchange_identification: Connection closed by remote host
can anyone help please (1 Reply)
Discussion started by: Satyak
1 Replies
4. Linux
Dear All,
Recently our server has been giving the error:
"ssh_ exchange-identification: Connection closed by remote host"
The error causes the server to become in accessible via ssh and the services are stopped/hung. The server has to be restarted to make it working normal again.
The... (3 Replies)
Discussion started by: vguleria
3 Replies
5. UNIX for Advanced & Expert Users
Suppose host B does not allow public/private key authentication - only secureID authentication. I already have a master ssh connection from host A to host B. Host A does allow public/private key authentication. Is there any way to connect from host C to host B by way of the master ssh connection... (2 Replies)
Discussion started by: cpp6f
2 Replies
6. UNIX for Advanced & Expert Users
Hi All,
When i try to do ssh from a linux to solaris box its throughing "Connection closed by remote host". Please not that this error is not occuring every time i do ssh, it occurs at random timing( Mostly ssh is successful) - unfortunately my script which is doing ssh is falling at this time... (4 Replies)
Discussion started by: pkumar7
4 Replies
7. UNIX for Advanced & Expert Users
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies
8. Red Hat
For a few days now I have been experiencing issues when trying to SSH into 1 of my machine. I get the following output when running 'ssh -vvv':
server1:/home/mymadq> ssh -l root -vvv server2
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config... (3 Replies)
Discussion started by: jaapar
3 Replies
9. Shell Programming and Scripting
Hi All,
I have a basic question.
In my system i maintained multiple unix server, and only one server has public ip, and all the servers are behind load balancing BIG ip server.
To access any server, user need to access server with public IP then from there they can establish ssh connection to... (2 Replies)
Discussion started by: dilipsn
2 Replies
10. Shell Programming and Scripting
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies
LEARN ABOUT SUSE
ssh-keysign
SSH-KEYSIGN(8) BSD System Manager's Manual SSH-KEYSIGN(8)
NAME
ssh-keysign -- ssh helper program for host-based authentication
SYNOPSIS
ssh-keysign
DESCRIPTION
ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication with
SSH protocol version 2.
ssh-keysign is disabled by default and can only be enabled in the global client configuration file /etc/ssh/ssh_config by setting
EnableSSHKeysign to ``yes''.
ssh-keysign is not intended to be invoked by the user, but from ssh(1). See ssh(1) and sshd(8) for more information about host-based authen-
tication.
FILES
/etc/ssh/ssh_config
Controls whether ssh-keysign is enabled.
/etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key
These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, read-
able only by root, and not accessible to others. Since they are readable only by root, ssh-keysign must be set-uid root if host-
based authentication is used.
SEE ALSO
ssh(1), ssh-keygen(1), ssh_config(5), sshd(8)
HISTORY
ssh-keysign first appeared in OpenBSD 3.2.
AUTHORS
Markus Friedl <markus@openbsd.org>
BSD
May 31, 2007 BSD