SCP not working while SSH works

Dear expert,

I have gone through the thread
A similar error arising for me , please find the debug logs.
I have tried from another server to push a file using scp but not working for me.

i am using SunOS SUNW,SPARC-Enterprise machine.

Thanks

Did you check if

ssh <remote_host> /bin/true 

produces some output?

It produces some classpath as output which is defined in the remote server .tcshrc file.

tcshrc started
CLASSPATHS 
blah blah.................

Not sure about Solaris, on AIX it's usually something's wrong with the user login profile when ssh works but scp / sftp don't.

Regards
zxmaus

Try renaming temporarily .tcshrc in .tcshrc_disabled and retry the scp command.
If it works, modify the initialization file so it doesn't produce any output.

@radoulov

Thanks for the suggestion , it works as expected.