[Solved] ssh works but scp does not

Structure of an SSH binary packet
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. I put the offending code or rather complete bashrc in the loop as mentioned below:

 

1
2
3
4
5
6
7
if [[ $SSH_CLIENT = "" ]

then

<bashrc code here>

fi

By doing this the <dot>bashrc is never executed when a ssh session is initiated (which is what happens for scp also). 🙂

Enhanced by Zemanta

PuTTY alternatives – AlternativeTo.net

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:
http://alternativeto.net/desktop/putty/

\"Enhanced

PuTTY ssh without password

you can do a ssh without password.. Today we will see how to do this with putty.

Generate public/private (DSA)key pair using puttygen.
copy the public key to ~/.ssh/authourized_keys on your server (moonware/sunware/skyware). Same key can be used on all the servers.
make sure that your home directory permissions are 755
directory permission for .ssh is 700
file permission for authourized_keys is 600
now login using putty and specify your private key in the configuration of putty and also specify your username.

Now when you login to the server, you will not be asked for password.