Category Archives: sysadmin

misc security sysadmin web

Logging into SSH with a different username

I love SSH. SSH is the de-facto service for remote server management, especially in a CLI environment.

Being a avid Linux user, and spending quite a bit of time on OSX lately, I often SSH into several servers remotely. Being subject to “username conventions”, you don’t always share the same username across machines. And I always wondered how one could just type ssh hostname instead of providing the username.

Seems that, by creating a .ssh/config file with following contents:


Host server.example.com server
  User username

WIll make life easier, as you can in the future only do a “ssh hostname”. I didn’t know this.

sysadmin

Keeping windows services’ running, ghetto style

A small post, but so I can have it as a reference if I ever encouter it again. We’ve setup a Windows 2003 Domain, and run DNS on both the Domain Controllers. We have terrible issues with DNS always shutting down, and disabling itself, so it won’t boot up again.

While we are breaking our heads on how this happens, we made a small two-liner script to enable a Windows service over the command line. We’ve put this in the recovery tab, and scheduled it as a task to run every hour.

The code to enable the DNS service, and to restart the service is below:


sc config DNS start= auto
net start dns

I know it’s very ghetto way of keeping DNS running, but we’re figuring out why DNS always shuts down. Until then, this provides us necesarry DNS uptime 😉

Thanks,
Michael