[Solved] ssh works but scp does not

2011-08-29 1 min read bash Fedora Linux
Image via Wikipedia For quite sometime now, I was having this issue, that for the home system, I was able to connect to is using ssh but it never worked. Fnally after quite some debugging finally I found that the issue was with thebashrc. So, everytime I had to do a scp I would have to move/rename bashrc and do the reverse action after the scp was done. Finally today I fixed it and the solution was very simple. Continue reading

faster bash operations on files with File Descriptors.

2011-06-11 2 min read bash Learning Linux
I was writing a bash script that would do some operations and read and write to file. Seems that that was pretty simple with 1 2 3 4 5 <td> <div class="text codecolorer"> while read line<br /> <br /> do<br /> <br /> done<file </div> </td> </tr> and then use redirection operations like “>” and “»” to write to file. Done with the script pretty fast. So far so good, when I went for real life tests, no one was interested in using it, why? Continue reading

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. 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. 1 2 3 4 5 <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> You can optionally omit the parameters that you do not require explicitly. Continue reading
Newer posts