manish
Password less ssh, scp setup
Why is this required ? – if you hate password prompt 🙂 – For automation scripts copying data using scp, sftp Lets assume two machines local with user “manish” remote with user “autouser” Step 1 : Generate public/private key pair on “local” host manish@local$ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which […]
How does GPS works ?
-What is GPS? The Global Positioning System (GPS) is a satellite-based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. -Is it free? Yes, GPS signals are free, you just need a GPS receiver device and maps. There is no subscription fee of GPS signals. […]
Playing with IPv6
IPv6 provides very large address space than IPv4. This results from the use of a 128 bit address compared to 32 bit address in IPv4. The new address space thus supports 2^128 addresses. This expansion provides flexibility in allocating addresses and routing traffic and eliminates the primary need for network address translation (NAT). To get […]
Remote execution of commands on Linux, Unix, Solaris using expect
#!/usr/local/bin/expect -f # ./ssh.sh user password IP/Host cmd cmd_arg set user [lrange $argv 0 0] set password [lrange $argv 1 1] set ipaddr [lrange $argv 2 2] set cmd [lrange $argv 3 3] set cmd_arg [lrange $argv 4 4] set timeout -1 spawn ssh $user@$ipaddr $cmd $cmd_arg match_max 100000 expect “*?assword:*” send — “$password\r” send […]
Buying a DTH new connection ? Read this
I am living in a high rise apartment at Gurgaon and recently I decided to go digital with dishtv HD. I got a good online deal and I paid by credit card. Installation guys turned up next day. They tried all three balconies of my apartment but could find signals. My apartment is on 3rd […]
Good bye ewebguru
Manish m@mka.in 06/09/2011 15:32 Hi, I was happy with the services and support. but every year I noticed prices went going up for renewal. while other hosting providers brought down prices or kept same. I fail to understand logic behind this business model. plus there was no handsome deal available for long term commitments. say […]
Unix remote user management using expect
To add a new user on remote unix host #!/usr/local/bin/expect -f # ./add.sh adminuser adminpass IP/Host user_to_be_added userpass_for_new_user # Manish Kumar Arya m@mka.in set user [lrange $argv 0 0] set password [lrange $argv 1 1] set ipaddr [lrange $argv 2 2] set username [lrange $argv 3 3] set userpass [lrange $argv 4 4] set timeout […]
Smart host relay email configuration on sendmail
1) Open /etc/mail/sendmail.mc Add following line in last define(`SMART_HOST’,`Some_SMTP_Server’) 2) Execute following to update /etc/mail/sendmail.cf file make -C /etc/mail/ Now in sendmail.cf you can see Smart host entry root@prg-vm:~# grep Some_SMTP_Server /etc/mail/sendmail.cf DSSome_SMTP_Server 3) restart or reload sendmail root@prg-vm:~# /etc/init.d/sendmail restart [ ok ] Restarting Mail Transport Agent (MTA): sendmail. root@prg-vm:~# 4) Verify logs May […]