Problem with ssh and scp

Hi there,

I'm working with two linux servers and if I use ssh to connect from 1 to 2 everything works fine ( ..as usual:rolleyes:), while if I try to connect via ssh or to copy files through scp (as I usually do...) from 2 to 1, after the password I get this message:

Connection closed by IP_server1
lost connection

I've already tried to switch off the firewall but it didn't work...

I've also noticed that in the server 1 with the command:

echo "`date \"+%d/%m/%Y %H.%M.%S\"`;`curl --head --max-time 5 Google 2>/dev/null | head -1`"

I don't get this usual message:

03/04/2010 18.30.01;HTTP/1.1 200 OK

but this one:

09/04/2010 11.30.01;

Maybe there could be a link?

Any help would be really appreciated!!!Thanks in advance!

Giordano Bruno

---------- Post updated at 02:51 PM ---------- Previous update was at 02:19 PM ----------

... now everything works fine and with the command:

echo "`date \"+%d/%m/%Y %H.%M.%S\"`;`curl --head --max-time 5 Google 2>/dev/null | head -1`"

I get the usual message:

03/04/2010 18.30.01;HTTP/1.1 200 OK

....so it' s a problem of the net?? Even if I can use internet (but today it's really slow)... sorry to bother you with my question ... but could anyone explain me what's happened???

Thanks!!!

Which OS are you using?

Check your

/etc/hosts.allow

and

/etc/hosts.deny

Also try to run scp with the "-v" flag.

What's in the logs on the server?

I'm using Linux Fedora 6, and now everything works fine, but could you explain how is it possible to get diffent messages with the comman curl?

Thanks in advance!!!

GB

What do you mean? What message is it giving, and what message would you want it to give?

Please give a look to the update of my first messagge...

Thanks for your time!!!

I've read your OP, and don't understand how your question relates to it. (or perhaps at all.) What message curl gives you usually relates to what you're telling it to do. What is it giving, and what do you want it to give instead?

Maybe you're getting an error message when you run the curl part and since you're sending STDERR to a null device probably that's why you are not seeing anything on the screen.

Example:

[test1@atlas ~]$ curl --head --max-time 5 localhost 2>/dev/null | head -1
HTTP/1.1 200 OK
[test1@atlas ~]$ curl --head --max-time 5 asdf123 | head -1
curl: (6) Couldn't resolve host 'asdf123'
[test1@atlas ~]$ curl --head --max-time 5 asdf123 2>/dev/null | head -1
[test1@atlas ~]$