I have remote location Linux running (CentOS 6.0). It has dynamic ip address so i installed noip2 service and copied the file cp redhat.noip2.sh /etc/profile.d/noip.sh.
Here you can see the noip.sh script running now for ever on reboot (see).
After that when the system restarted once, it never have the correct shell. As a result remotely when i try to ssh the server i cant login and i cant do anything. Can anyone solve this? Here is the details i tried:
When i debug the ssh i see that debug1: Authentication succeeded (password). and command is also sent but nothing just happen. I simply cant fix it yet.
All failed:
ssh root@host 'rm -fr /etc/profile.d/noip.sh'
scp emptynoip.sh root@host:/etc/profile.d/noip.sh
ssh root@host /bin/sh
ssh root@host /bin/bash
ssh root@host --norc -i
ssh root@host -- --norc -i
ssh root@host bash --norc -i
ssh root@host /bin/bash -i './etc/profile.d/noip2 stop'
ssh root@host /bin/bash -i './etc/profile.d/noip stop'
ssh root@host /bin/bash -l './etc/profile.d/noip stop'
many more... combination i tried all failed. Is there any single option that i can try?
/etc/profile.dis a bad idea. (Situation: server reboots, obtains a different address, but DNS is not updated since profile.d is launched at login time, and you cannot login without updating DNS first...) Use/etc/rc.localor similar instead. – grawity Aug 29 '11 at 16:16profilefiles can be interrupted that way. Ctrl-Z and Ctrl-\ may work too. – grawity Aug 29 '11 at 16:17