Friday, July 17, 2015

Remote Desktop Connection Manager

Remote Desktop Connection Manager is a very nice and freely available tool from Microsoft to manage multiple remote desktop sessions. Currently available version is 2.2 and it can be downloaded from here.

I liked following features in it :- 
  • Ability to group your servers and pass on configuration (password, display settings etc) from parent (group) to individual nodes (servers)
  • Ability to see the thumbnails (and also re-size them) for servers
  • Connect/Disconnect multiple server in one shot
Note :- I got error 3334 on trying to connect more than 5 servers simultaneously. Once I got this error then I was consistently getting it, even if concurrent connections were less than 5. Solution is to configure "Distributed Transaction Coordinator" (DTC, can be found under Component Services, shortcut to go to component services is to run dcomcnfg.exe) not to use any authentication. Detailed solution can be found here.


Wednesday, January 21, 2015

Setting Environment Variables in Ubuntu

For setting an environment variable for a particular user do it in one of the following files :-
  • ~/.pam_environment
  • ~/.profile
For setting a system wide environment variable do it in one of the following files :-
  • /etc/environment
  • /etc/profile.d/*.sh
I use ~/.profile for user specific variables and /etc/environment for system wide variables. The detailed explanation for this article can be found on Ubuntu Site.


Friday, January 2, 2015

Compiling a C program on Linux

Assuming you want to compile a file "test.c" and you want the name of the binary to be "hello"
> gcc -Wall -Wstrict-prototypes -ansi -pedantic test.c -o hello

Linux - SSH login without password

  1. Assuming you want to setup password less ssh login for user "user-1" from host "machine-1" to user "root" on host "machine-2"
  2. Login into "machine-1" as "user-1"
  3. Check if there exists a file "/home/user-1/.ssh/id_rsa.pub" (Note dot . before ssh). If this file exists then go to step 5
  4. Run this command with all default values 
    • ssh-keygen -t rsa
  5. Run this command to copy "/home/user-1/.ssh/id_rsa.pub" file to remote host 
    • ssh-copy-id -i root@machine-2
  6. Try login into remote machine and verify that it does not ask for any password
    • ssh root@machine-2
  7. You can also directly run commands on remote machine
    • ssh root@machine-2 hostname
References :-
  1. http://www.linuxproblem.org/art_9.html
  2. http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/