Difference between revisions of "Deleting shell start-up scripts remotely without executing them"
From Notes_Wiki
(Created page with "=Deleting shell start-up scripts remotely without executing them= While working on VMs on clouds to which we have only ssh access, if we make mistake in some start-up file an...") |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Server administration tips and tricks]] > [[Deleting shell start-up scripts remotely without executing them]] | |||
While working on VMs on clouds to which we have only ssh access, if we make mistake in some start-up file and want to disable/delete it then we can use command | While working on VMs on clouds to which we have only ssh access, if we make mistake in some start-up file and want to disable/delete it then we can use command | ||
Line 8: | Line 8: | ||
For example this is very useful if we have mentioned 'exit 0' in one of the scripts in '<tt>/etc/profile.d</tt>' directory. | For example this is very useful if we have mentioned 'exit 0' in one of the scripts in '<tt>/etc/profile.d</tt>' directory. | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Server administration tips and tricks]] > [[Deleting shell start-up scripts remotely without executing them]] |
Latest revision as of 15:56, 22 July 2022
Home > CentOS > CentOS 6.x > Server administration tips and tricks > Deleting shell start-up scripts remotely without executing them
While working on VMs on clouds to which we have only ssh access, if we make mistake in some start-up file and want to disable/delete it then we can use command
ssh -tt root@<vm_hostname_or_ip> 'rm -f <filename>'
To just disable script one can use 'chmod 000 <filename>' type of command.
For example this is very useful if we have mentioned 'exit 0' in one of the scripts in '/etc/profile.d' directory.
Home > CentOS > CentOS 6.x > Server administration tips and tricks > Deleting shell start-up scripts remotely without executing them