Terminating a SSH session after starting background process.

2011-05-14 3 min read Learning Linux

 

This is too good. If you are planning to start a background process in the bash script in the background and continue in the script, you cannot do it until…….

You would need to close the stdout/stdin and stderr before you can terminate any ssh session automatically. Here’s some more light on this topic.

http://lists.debian.org/debian-user/2005/09/msg00254.html

On Thu, Sep 01, 2005 at 05:33:28PM -0400, Roberto C. Sanchez wrote: > I occasionally log into a machine remotely and start a process in the > background: > > command & > > However, when I log out of the machine, the ssh process on my local > machine blocks. I guess that it is becuase the remote still has jobs > running. Is there a way to get it start the process in the background > and then detach from the shell? I have already tried this:

Continue reading

Easy ssh configuration with .ssh/config file

2011-04-11 1 min read Bash Learning Linux

If you ssh to many hosts then you are aware of the pain that it takes to ssh with different username and hostname. There is an alias that you can creat with native ssh though. Here I will show you the same with an example.

  <td>
    <div class="text codecolorer">
      cat <<EOF >>~/.ssh/config<br /> Host <alias><br /> Username <user name><br /> Port <port number><br /> Hostname <hostname>
    </div>
  </td>
</tr>
1
2
3
4
5

You can optionally omit the parameters that you do not require explicitly. For example, if your port number is default then you can simply ignore the parameter.

Continue reading

PuTTY alternatives - AlternativeTo.net

2010-07-27 1 min read Uncategorized

I like PuTTY quite a bit but do not like the fact that it does not have any tab feature. So, if I am working on multiple machines then un-necessarily I will have too many windows open cluttering my desktop. So, here is the result of my quest to find the alternative:
<a href="http://alternativeto.net/desktop/putty/">http://alternativeto.net/desktop/putty/<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/06/05/putty-ssh-without-password/">PuTTY ssh without password (amit-agarwal.co.in) <li class="zemanta-article-ul-li"><a href="http://www.downloadsquad.com/2010/05/18/kitty-is-win32-native-putty/?zemanta-tracking">KiTTY is Win32-native PuTTY (downloadsquad.com) <li class="zemanta-article-ul-li"><a href="http://lifehacker.com/5541871/kitty-adds-session-saving-portability-and-more-to-putty">KiTTY Adds Session Saving, Portability, and More to PuTTY [Downloads] (lifehacker.com) <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/04/11/putty-export-client-display-on-login-for-opening-x-application-and-terminal/">PuTTY export client display on login for opening X application and terminal. (amit-agarwal.co.in) <div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/zemified_e3.png" alt="Enhanced by Zemanta" /><span class="zem-script more-related pretty-attribution">

Continue reading

importing outlook pst files in evolution in Fedora 13 ( Goddard)

2010-07-25 1 min read Fedora Linux

If you were using outlook and moved to some other <a class="zem_slink freebase/en/e-mail_client" title="Email client" rel="wikipedia" href="http://en.wikipedia.org/wiki/Email_client">mail client then you know the pain of moving the mails from outlook mail from outlook to any other client.

If you are using evolution on <a class="zem_slink freebase/en/fedora" title="Fedora" rel="homepage" href="http://fedoraproject.org/">Fedora, then you are in luck. Just install the plug-in and select the file to import as simple as that.

sudo yum install evolution-pst

Continue reading

wmctrl – window control manager

2010-06-16 0 min read Fedora Linux
\"Blue
Image via Wikipedia

What is <a class="zem_slink freebase/en/wmctrl" title="Wmctrl" rel="wikipedia" href="http://en.wikipedia.org/wiki/Wmctrl">wmctrl?

wmctrl  is  a  command that can be used to interact with an X Window manager that is compatible with the EWMH/NetWM specification.  wmctrl can query the <a class="zem_slink freebase/en/window_manager" title="Window manager" rel="wikipedia" href="http://en.wikipedia.org/wiki/Window_manager">window manager for information, and it can request that certain window management actions be taken.

Continue reading

PuTTY export client display on login for opening X application and terminal.

2010-04-11 1 min read Bash Linux

export DISPLAY=$(echo $SSH_CLIENT |awk '{print $1&#8221;:0.0&#8221;}&#8217;)

Explanation:

SSH_CLIENT contains the IP and the port of the client machine. So we need to export (Client IP):0.0 for the display on the client machine. If the above is put in .bashrc or .bash_profile or .profile, then the DISPLAY variable will be set based on the client machine.