Manage your servers the easy way with perl script over ssh with no remote client.

2013-05-06 8 min read Linux perl
For a long time I have not posted any script. So, its not that I have not written anything new, but just that did not put them here in lack of time. So, here is one interesting one. The original idea came from one posted in one of the interesting blog here. But the problem with this one was that for every time, it ran in the cron, it would make multiple entries in the “last” output (about 10 or more with my modifications for differentiating between solaris and Linux). Continue reading

slow ssh connection

2013-02-26 1 min read Linux
If you are experiencing slow ssh connections, then possibly your system is trying to do reverse lookup of the IP address. If that is the case, then you can add the below to “hosts” line in /etc/nsswitch.conf file. ‘[NOTFOUND=return]’ The other cause for slow connections can be GSSAPI authentication. If that is the case, then the simplest solution is to add the following in your “~/.ssh/config” file: GSSAPIAuthentication no Related articles ssh reverse tunning. Continue reading

ssh reverse tunning..

2013-02-14 1 min read Fedora Learning Linux
If you want to access some local resources like the release website from the remote server when you are connecting to the remoter server using ssh over VPN, then possibly reverse ssh tunnelling is the best option. So, basically when you are connecting to the remote server, you tell the server your intent to do so and which local resource you want to connect to and on which port.So, here I want to connnet to google. Continue reading

quick bash script for datewise backup of directory

2012-12-12 1 min read bash Linux
I was working on something and the data was very critical and needed backup. I wrote a bash script to back up the data every 5 hours with cron and bash script. Thought I will share that with you. Here is the script. #!/bin/bash - #=============================================================================== # # FILE: backup.sh # # USAGE: ./backup.sh # # DESCRIPTION: Backup all the current files. # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Amit Agarwal (aka), amit. Continue reading

conky script used to monitor server status remotely.

2012-01-12 2 min read bash Fedora
[][1]Image via Wikipedia I was looking for something to monitor few details on the server. I thought about quite a lot of applications, some open source and some scripts developed in house. But my requirements were quite petty and the scripts and applications were quite heavy. So, I thought why not conky :). So, with some quick work on conky script, I was able to get what I wanted and here it is for all of you. Continue reading

Add ssh key to remote host

2011-11-15 3 min read bash Learning Linux Solaris
Image via Wikipedia If you are working on recent versions of the *nix OS like Fedora or Ubuntu then you would know about the commad ssh-copy-id. But if you land up using one of the older versions like Solaris or something where the command is not present, then probably you need a simpler solution to this. One of the simplest solution is with a lot of assumtions, simply copy the id_rsa file to remote server and hope it works. Continue reading

ss – utility to investigate sockets.

2011-09-07 1 min read Fedora Linux
Sometimes, you find some interesting application/command by accident, and that is just what happened a few days back. Well, I was doing a ssh and as usual made my share of mistake in typing and missed the “h” from the ssh command and saw a list of options instead of my prompt on remote server. Now, that set me thinking and fond that its a very interesting command that comes with iproute on Fedoara, so if you want this command, then install iproute like this Continue reading
Older posts