Friday, October 28, 2005

unix tip: when ssh root@hostname is not allowed

i guess most of the unix servers are configured not to allow root to ssh directly, at least sys admin will configured such way for security purpose. but in case of emergency or whatever reasons, you can try.
eg:

$ ssh -t root@hostname "su -"
- provide the root password & you are in as root.

this trick becomes handy when your password is expired or your account is locked, so that u can reset your password or unlock your account, but of cos u have to know the root password ;)
it works for solaris, unfortunately not with linux.

credit goes to my buddy - LC

No comments: