f



SSH cannot login , remote system say /bin/bash: no such file or directory

Hello,
 
 I was working on a remote server with centos 5.  Trying to re-install glibc
and
 after it showed /bin/bash: bad interpreter.
 
 I logged out of the server and when I try to login, I get connected for a
second
 and immediately get disconnected.
 
 [suppor@server ~]$ ssh -vv user@remoteserver
 OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
 debug1: Reading configuration data /etc/ssh/ssh_config
 debug1: Applying options for *
 debug2: ssh_connect: needpriv 0
 debug1: Connecting to 192.168.10.55 [192.168.10.55] port 22.
 debug1: Connection established.
 debug1: identity file /home/suppor/.ssh/identity type -1
 debug1: identity file /home/suppor/.ssh/id_rsa type -1
 debug2: key_type_from_name: unknown key type '-----BEGIN'
 debug2: key_type_from_name: unknown key type '-----END'
 debug1: identity file /home/suppor/.ssh/id_dsa type 2
 debug1: loaded 3 keys
 debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
 debug1: match: OpenSSH_4.3 pat OpenSSH*
 debug1: Enabling compatibility mode for protocol 2.0
 debug1: Local version string SSH-2.0-OpenSSH_4.3
 debug2: fd 3 setting O_NONBLOCK
 debug1: SSH2_MSG_KEXINIT sent
 debug1: SSH2_MSG_KEXINIT received
 debug2: kex_parse_kexinit:

diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
 debug2: kex_parse_kexinit:

aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
 debug2: kex_parse_kexinit:

aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
 debug2: kex_parse_kexinit:

hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
 debug2: kex_parse_kexinit:

hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
 debug2: kex_parse_kexinit:
 debug2: kex_parse_kexinit:
 debug2: kex_parse_kexinit: first_kex_follows 0
 debug2: kex_parse_kexinit: reserved 0
 debug2: kex_parse_kexinit:

diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
 debug2: kex_parse_kexinit:

aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
 debug2: kex_parse_kexinit:

aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
 debug2: kex_parse_kexinit:

hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
 debug2: kex_parse_kexinit:

hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
 debug2: kex_parse_kexinit: none,zlib@openssh.com
 debug2: kex_parse_kexinit: none,zlib@openssh.com
 debug2: kex_parse_kexinit:
 debug2: kex_parse_kexinit:
 debug2: kex_parse_kexinit: first_kex_follows 0
 debug2: kex_parse_kexinit: reserved 0
 debug2: mac_init: found hmac-md5
 debug1: kex: server->client aes128-cbc hmac-md5 none
 debug2: mac_init: found hmac-md5
 debug1: kex: client->server aes128-cbc hmac-md5 none
 debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
 debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
 debug2: dh_gen_key: priv key bits set: 128/256
 debug2: bits set: 539/1024
 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
 debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
 debug1: Host '192.168.10.55' is known and matches the RSA host key.
 debug1: Found key in /home/suppor/.ssh/known_hosts:3
 debug2: bits set: 489/1024
 debug1: ssh_rsa_verify: signature correct
 debug2: kex_derive_keys
 debug2: set_newkeys: mode 1
 debug1: SSH2_MSG_NEWKEYS sent
 debug1: expecting SSH2_MSG_NEWKEYS
 debug2: set_newkeys: mode 0
 debug1: SSH2_MSG_NEWKEYS received
 debug1: SSH2_MSG_SERVICE_REQUEST sent
 debug2: service_accept: ssh-userauth
 debug1: SSH2_MSG_SERVICE_ACCEPT received
 debug2: key: /home/suppor/.ssh/identity ((nil))
 debug2: key: /home/suppor/.ssh/id_rsa ((nil))
 debug2: key: /home/suppor/.ssh/id_dsa (0x92caea0)
 debug1: Authentications that can continue: publickey,gssapi-with-mic,password
 debug1: Next authentication method: gssapi-with-mic
 debug1: Unspecified GSS failure.  Minor code may provide more information
 No credentials cache found
 
 debug1: Unspecified GSS failure.  Minor code may provide more information
 No credentials cache found
 
 debug1: Unspecified GSS failure.  Minor code may provide more information
 No credentials cache found
 
 debug2: we did not send a packet, disable method
 debug1: Next authentication method: publickey
 debug1: Trying private key: /home/suppor/.ssh/identity
 debug1: Trying private key: /home/suppor/.ssh/id_rsa
 debug1: Offering public key: /home/suppor/.ssh/id_dsa
 debug2: we sent a publickey packet, wait for reply
 debug1: Authentications that can continue: publickey,gssapi-with-mic,password
 debug2: we did not send a packet, disable method
 debug1: Next authentication method: password
 user@remoteserver's password:
 debug2: we sent a password packet, wait for reply
 debug1: Authentication succeeded (password).
 debug1: channel 0: new [client-session]
 debug2: channel 0: send open
 debug1: Entering interactive session.
 debug2: callback start
 debug2: client_session2_setup: id 0
 debug2: channel 0: request pty-req confirm 0
 debug1: Sending environment.
 debug1: Sending env LANG = en_US.UTF-8
 debug2: channel 0: request env confirm 0
 debug2: channel 0: request shell confirm 0
 debug2: fd 3 setting TCP_NODELAY
 debug2: callback done
 debug2: channel 0: open confirm rwindow 0 rmax 32768
 debug2: channel 0: rcvd adjust 2097152
 Last login: Fri Feb 11 15:27:11 2011 from crshost
 /bin/bash: No such file or directory
 debug2: channel 0: rcvd eof
 debug2: channel 0: output open -> drain
 debug2: channel 0: obuf empty
 debug2: channel 0: close_write
 debug2: channel 0: output drain -> closed
 debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
 debug2: channel 0: rcvd close
 debug2: channel 0: close_read
 debug2: channel 0: input open -> closed
 debug2: channel 0: almost dead
 debug2: channel 0: gc: notify user
 debug2: channel 0: gc: user detached
 debug2: channel 0: send close
 debug2: channel 0: is dead
 debug2: channel 0: garbage collecting
 debug1: channel 0: free: client-session, nchannels 1
 Connection to remoteserver closed.
 debug1: Transferred: stdin 0, stdout 0, stderr 37 bytes in 0.0 seconds
 debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 7557.3
 debug1: Exit status 1
 
 I noticed the line '/bin/bash:no such file or directory" when
 disconnecting.  Is that the cause of the problem.  Please help.
0
shashi
2/11/2011 3:54:53 PM
comp.os.linux.networking 15677 articles. 0 followers. Post Follow

5 Replies
1823 Views

Similar Articles

[PageSpeed] 34

shashi <shashi@domain-xyz.in> writes:
>  I was working on a remote server with centos 5.  Trying to re-install
> glibc and after it showed /bin/bash: bad interpreter.
[...]
>  I noticed the line '/bin/bash:no such file or directory&quot; when
>  disconnecting.  Is that the cause of the problem.  Please help.

You broke your glibc installation.  Time to restore from backups using a
rescue disk, or reinstall.

-- 
http://www.greenend.org.uk/rjk/
0
Richard
2/11/2011 4:01:11 PM
 Richard Kettlewell wrote on 02/11/2011 11:01 ET :
> shashi  writes:
>> I was working on a remote server with centos 5.  Trying to re-install
>> glibc and after it showed /bin/bash: bad interpreter.
>> 
>> 
> [...]
>> I noticed the line '/bin/bash:no such file or directory&amp;quot; when
>> disconnecting.  Is that the cause of the problem.  Please help.
>> 
>> 
>> 
> You broke your glibc installation.  Time to restore from backups using a
> rescue disk, or reinstall.
> 
> http://www.greenend.org.uk/rjk/
> 
 Thank you very much for the response.
 
 Do I have to just boot up the system in rescue mode and re-install the glibc
 using 'yum' command.
 Or is there any other way to do this.  Please tell me how to do this.
 
 Thanks
0
shashi
2/11/2011 5:39:09 PM
>> shashi  writes:
>>> I was working on a remote server with centos 5.  Trying to re-install
>>> glibc and after it showed /bin/bash: bad interpreter.

> Richard Kettlewell wrote on 02/11/2011 11:01 ET :
>> You broke your glibc installation.  Time to restore from backups
>> using a rescue disk, or reinstall.

shashi <shashi@domain-xyz.in> wrote:
> Do I have to just boot up the system in rescue mode and re-install
> the glibc using 'yum' command.

It's highly unlikely you'll be able to restart your system. (In fact
it's quite probable that it won't shut down cleanly, either.) Instead,
you have to do what RK suggested, and boot from a rescue disk. This is
not rescue mode on your existing installation, this is a CD/DVD or USB
stick that can be booted in rescue mode. Your installation disk (or a
recent downloadable one will probably have a rescue mode.

Chris
0
Chris
2/11/2011 10:56:06 PM
On Feb 11, 7:54=A0am, shashi <sha...@domain-xyz.in> wrote:

> =A0I was working on a remote server with centos 5. =A0Trying to re-instal=
l glibc
> and
> =A0after it showed /bin/bash: bad interpreter.
>
> =A0I logged out of the server and when I try to login, I get connected fo=
r a
> second
> =A0and immediately get disconnected.

Here's a valuable lesson: If there's any chance at all you might have
screwed up a system, DO NOT LOG OUT until you 100% confirm you can LOG
BACK IN!

DS
0
davids (1371)
2/14/2011 4:24:10 AM
 David Schwartz wrote on 02/13/2011 23:24 ET :
> On Feb 11, 7:54&nbsp;am, shashi  wrote:
> 
>> &nbsp;I was working on a remote server with centos 5. &nbsp;Trying to
>> re-install glibc
>> and
>> &nbsp;after it showed /bin/bash: bad interpreter.
>> 
>> &nbsp;I logged out of the server and when I try to login, I get connected
for
>> a
>> second
>> &nbsp;and immediately get disconnected.
>> 
>> 
>> 
> Here's a valuable lesson: If there's any chance at all you might have
> screwed up a system, DO NOT LOG OUT until you 100% confirm you can LOG
> BACK IN!
> 
> DS
> 
 Thank you for all your responses...
 
 I will boot using centos bootable usb to find rescue image and will install
the
 glibc* packages. hope everything goes well...
0
shashi52 (1)
2/14/2011 4:41:39 PM
Reply: