another c++ q (with specialization and inheritance )

2009-04-28 Thread Erez D
i am having problems compiling the following code:


#if 1
template  class c1 {};
template  class c2 : public c1 { public: c2(T &a); };
#else
template  class c1;
template  class c2;
#endif

template <> class c1
{
int m_a;
public:
c1():m_a(0) {};
c1(int a):m_a(a) {};
c1(int &a):m_a(a) {};
void set(const int a) {m_a=a;};
const int get(void) const {return m_a;};
c2 gen_c2(int a)
{
c2 ret(a);
return ret;
}
const c1 &operator=(const c1 &other) {set(other.get());
return *this;};
};

template <> class c2 : public c1
{
public:
c2(int &a):c1(a) {};
};

int main()
{
c1 a;
c2 b=a.gen_c2();
}
===
if i compile it, i get:
file.cpp:27: error: specialization of ‘c2’ after instantiation

if on the other hand i change the #if 1 to #if 0, i get:
file.cpp: In member function ‘c2 c1::gen_c2(int)’:
file.cpp:20: error: return type ‘struct c2’ is incomplete
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: another c++ q (with specialization and inheritance )

2009-04-28 Thread Shachar Shemesh

Erez D wrote:

c2 gen_c2(int a)
{
c2 ret(a);
return ret;
}

It would seem to me that this line instantiates c2, so that

template <> class c2 : public c1
{
public:
c2(int &a):c1(a) {};
};

is an attempt to specialized a class that has already been instantiated 
from the generic template. The compiler has no way to go back and change 
the storage size for c2, which it already needed to know when 
compiling the lines above.


Try to have gen_c2 return a pointer to c2. That may resolve the 
problem.


Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


ssh from 012 cable to server in US fail

2009-04-28 Thread Rami Addady

Hi,


I have weird problem , staring this morning I can't ssh to a server in 
US,  from some computers that connect to the Internet using 012 cabels.


But if I'm ssh to server in 012 farm and then from it to the US server 
is work fine!


I called 012 technical support but they didn't  help me.


It's not a FW issue because the ssh session start.

When I try to ssh it start and after some time fail , here is debug session.


ssh -v -l user 111.111.111.111


OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to ... port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

... after few minutes...

Connection closed by 111.111.111.111


Any idea what wrong


Rami



___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: another c++ q (with specialization and inheritance )

2009-04-28 Thread Erez D
On Tue, Apr 28, 2009 at 11:08 AM, Shachar Shemesh wrote:

>  Erez D wrote:
>
> c2 gen_c2(int a)
> {
> c2 ret(a);
> return ret;
> }
>
> It would seem to me that this line instantiates c2, so that
>
> template <> class c2 : public c1
> {
> public:
> c2(int &a):c1(a) {};
> };
>
>  is an attempt to specialized a class that has already been instantiated
> from the generic template. The compiler has no way to go back and change the
> storage size for c2, which it already needed to know when compiling the
> lines above.
>

I can't write c2 first as it is derived out of c1
I can't write c1 first as it has a function that returns c2
if i use forward declaration (like i did), i get "specialization after
instanciation"


> Try to have gen_c2 return a pointer to c2. That may resolve the
> problem.
>
no, it doesnt.

i am sure that there is a solution to this.
but i don't know what it is.

thanks,
erez.

>
> Shachar
>
> --
> Shachar Shemesh
> Lingnu Open Source Consulting Ltd.http://www.lingnu.com
>
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: another c++ q (with specialization and inheritance )

2009-04-28 Thread Shachar Shemesh

Erez D wrote:





Try to have gen_c2 return a pointer to c2. That may resolve
the problem.

no, it doesnt.

i am sure that there is a solution to this.
Try to have gen_c2 return a pointer to c2, and place the actual 
function body definition after the definition of c2.


If that fails, have gen_c2 return a pointer to c1. As c1 is a 
public parent of c2, it should amount to almost the same thing.


In any case, having a child function return a copy of a parent class is 
bad OO design.


Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ssh from 012 cable to server in US fail

2009-04-28 Thread Yedidyah Bar-David
On Tue, Apr 28, 2009 at 11:10:30AM +0300, Rami Addady wrote:
> Hi,
>
>
> I have weird problem , staring this morning I can't ssh to a server in  
> US,  from some computers that connect to the Internet using 012 cabels.
>
> But if I'm ssh to server in 012 farm and then from it to the US server  
> is work fine!

So you can look at the server logs and see what went wrong. You can also
try and run it with '-v' to add verbosity there too. If you do, first
try it on a local machine to make sure you do not kill it accidentally.

I have no idea re the actual problem.
-- 
Didi


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ssh from 012 cable to server in US fail

2009-04-28 Thread Noam Meltzer
Can you provide the server logs? (The connected site)
It can easily shed light on the subject.
On RHEL the log file in interest is /var/log/secure.

- Noam

On Tue, Apr 28, 2009 at 11:10 AM, Rami Addady  wrote:

> Hi,
>
>
> I have weird problem , staring this morning I can't ssh to a server in US,
>  from some computers that connect to the Internet using 012 cabels.
>
> But if I'm ssh to server in 012 farm and then from it to the US server is
> work fine!
>
> I called 012 technical support but they didn't  help me.
>
>
> It's not a FW issue because the ssh session start.
>
> When I try to ssh it start and after some time fail , here is debug
> session.
>
>
> ssh -v -l user 111.111.111.111
>
>
> OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
>
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: Applying options for *
> debug1: Connecting to ... port 22.
> debug1: Connection established.
> debug1: identity file /home/user/.ssh/identity type -1
> debug1: identity file /home/user/.ssh/id_rsa type -1
> debug1: identity file /home/user/.ssh/id_dsa type -1
> debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
> debug1: match: OpenSSH_4.3 pat OpenSSH*
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_3.9p1
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug1: kex: server->client aes128-cbc hmac-md5 none
> debug1: kex: client->server aes128-cbc hmac-md5 none
> debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
>
> ... after few minutes...
>
> Connection closed by 111.111.111.111
>
>
> Any idea what wrong
>
>
> Rami
>
>
>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ssh from 012 cable to server in US fail

2009-04-28 Thread Rami Addady

Hi,



Can you provide the server logs? (The connected site)


There are no new entry in /var/log/secure



ou can also try and run it with '-v' to add verbosity there too.



The -v output can be found in my first post


Thank,


Rami



Noam Meltzer wrote:


Can you provide the server logs? (The connected site)
It can easily shed light on the subject.
On RHEL the log file in interest is /var/log/secure.

- Noam

On Tue, Apr 28, 2009 at 11:10 AM, Rami Addady > wrote:


Hi,


I have weird problem , staring this morning I can't ssh to a
server in US,  from some computers that connect to the Internet
using 012 cabels.

But if I'm ssh to server in 012 farm and then from it to the US
server is work fine!

I called 012 technical support but they didn't  help me.


It's not a FW issue because the ssh session start.

When I try to ssh it start and after some time fail , here is
debug session.


ssh -v -l user 111.111.111.111


OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003

debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to ... port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version
OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

... after few minutes...

Connection closed by 111.111.111.111


Any idea what wrong


Rami



___
Linux-il mailing list
Linux-il@cs.huji.ac.il 
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ssh from 012 cable to server in US fail

2009-04-28 Thread Tomer Cohen
Hi,

I had the same issue yesterday evening (012, cable). After few hours I
periodically tried, I was able to access the machines (one is located in
Dreamhost, the other at sourceforge.net), but very slowly and with sudden
disconnections after about one minute of each connection.



On Tue, Apr 28, 2009 at 11:10, Rami Addady  wrote:

> Hi,
>
>
> I have weird problem , staring this morning I can't ssh to a server in US,
>  from some computers that connect to the Internet using 012 cabels.
>
> But if I'm ssh to server in 012 farm and then from it to the US server is
> work fine!
>
> I called 012 technical support but they didn't  help me.
>
>
> It's not a FW issue because the ssh session start.
>
> When I try to ssh it start and after some time fail , here is debug
> session.
>
>
> ssh -v -l user 111.111.111.111
>
>
> OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
>
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: Applying options for *
> debug1: Connecting to ... port 22.
> debug1: Connection established.
> debug1: identity file /home/user/.ssh/identity type -1
> debug1: identity file /home/user/.ssh/id_rsa type -1
> debug1: identity file /home/user/.ssh/id_dsa type -1
> debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
> debug1: match: OpenSSH_4.3 pat OpenSSH*
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_3.9p1
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug1: kex: server->client aes128-cbc hmac-md5 none
> debug1: kex: client->server aes128-cbc hmac-md5 none
> debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
>
> ... after few minutes...
>
> Connection closed by 111.111.111.111
>
>
> Any idea what wrong
>
>
> Rami
>
>
>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>



-- 
Tomer Cohen
http://tomercohen.com

H. L. Mencken  - "It is even harder for the average ape to believe that he
has descended from man."
 
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ssh from 012 cable to server in US fail

2009-04-28 Thread sara fink
Please follow these steps:

1. I will highly suggest to launch wireshark when you try to ssh. If you see
a RST, I won't be surprised at all.  You may see a RST that comes from your
ip. Don't be surprised.

2.  You must understand the following thing: they have clients rank A and
clients rank D. from the farm it is possible to ssh (client rank A). from
work/home directly you are client rank D. Take in consideration that you ssh
to usa. you waste their bandwidth.

3. try to ssh to the usa server from other server that doesn't use 012.

4. try to ssh to a server in israel and compare.

5. Try to run the following command tcptraceroute -v  22
and see where it gets stuck (timing).

6. I smell a Deep Packet Inspection. I will be very happy to be proved
wrong.


On Tue, Apr 28, 2009 at 12:37 PM, Rami Addady  wrote:

> Hi,
>
>
>  Can you provide the server logs? (The connected site)
>>
>
> There are no new entry in /var/log/secure
>
>
>  ou can also try and run it with '-v' to add verbosity there too.
>>
>
>
> The -v output can be found in my first post
>
>
> Thank,
>
>
> Rami
>
>
>
> Noam Meltzer wrote:
>
>  Can you provide the server logs? (The connected site)
>> It can easily shed light on the subject.
>> On RHEL the log file in interest is /var/log/secure.
>>
>> - Noam
>>
>> On Tue, Apr 28, 2009 at 11:10 AM, Rami Addady > r...@active.co.il>> wrote:
>>
>>Hi,
>>
>>
>>I have weird problem , staring this morning I can't ssh to a
>>server in US,  from some computers that connect to the Internet
>>using 012 cabels.
>>
>>But if I'm ssh to server in 012 farm and then from it to the US
>>server is work fine!
>>
>>I called 012 technical support but they didn't  help me.
>>
>>
>>It's not a FW issue because the ssh session start.
>>
>>When I try to ssh it start and after some time fail , here is
>>debug session.
>>
>>
>>ssh -v -l user 111.111.111.111
>>
>>
>>OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
>>
>>debug1: Reading configuration data /etc/ssh/ssh_config
>>debug1: Applying options for *
>>debug1: Connecting to ... port 22.
>>debug1: Connection established.
>>debug1: identity file /home/user/.ssh/identity type -1
>>debug1: identity file /home/user/.ssh/id_rsa type -1
>>debug1: identity file /home/user/.ssh/id_dsa type -1
>>debug1: Remote protocol version 2.0, remote software version
>>OpenSSH_4.3
>>debug1: match: OpenSSH_4.3 pat OpenSSH*
>>debug1: Enabling compatibility mode for protocol 2.0
>>debug1: Local version string SSH-2.0-OpenSSH_3.9p1
>>debug1: SSH2_MSG_KEXINIT sent
>>debug1: SSH2_MSG_KEXINIT received
>>debug1: kex: server->client aes128-cbc hmac-md5 none
>>debug1: kex: client->server aes128-cbc hmac-md5 none
>>debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
>>debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
>>
>>... after few minutes...
>>
>>Connection closed by 111.111.111.111
>>
>>
>>Any idea what wrong
>>
>>
>>Rami
>>
>>
>>
>>___
>>Linux-il mailing list
>>Linux-il@cs.huji.ac.il 
>>http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>
>>
>>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ssh from 012 cable to server in US fail

2009-04-28 Thread Ira Abramov
Quoting Tomer Cohen, from the post of Tue, 28 Apr:
> Hi,
> 
> I had the same issue yesterday evening (012, cable). After few hours I
> periodically tried, I was able to access the machines (one is located in
> Dreamhost, the other at sourceforge.net), but very slowly and with sudden
> disconnections after about one minute of each connection.

these all sound annoyingly like the "adventures" a friend of mine had
when connecting to my server from china, including obvious
man-in-the-middle attacks, such as each time hׁ” tried to connect, the
"server" would display a different host key.

If the state of Israel has started building a "great firewall" they are
both doing it wrong, as well as against the current law. very sad :-(


> 
> 
> 
> On Tue, Apr 28, 2009 at 11:10, Rami Addady  wrote:
> 
> > Hi,
> >
> >
> > I have weird problem , staring this morning I can't ssh to a server in US,
> >  from some computers that connect to the Internet using 012 cabels.
> >
> > But if I'm ssh to server in 012 farm and then from it to the US server is
> > work fine!
> >
> > I called 012 technical support but they didn't  help me.
> >
> >
> > It's not a FW issue because the ssh session start.
> >
> > When I try to ssh it start and after some time fail , here is debug
> > session.
> >
> >
> > ssh -v -l user 111.111.111.111
> >
> >
> > OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
> >
> > debug1: Reading configuration data /etc/ssh/ssh_config
> > debug1: Applying options for *
> > debug1: Connecting to ... port 22.
> > debug1: Connection established.
> > debug1: identity file /home/user/.ssh/identity type -1
> > debug1: identity file /home/user/.ssh/id_rsa type -1
> > debug1: identity file /home/user/.ssh/id_dsa type -1
> > debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
> > debug1: match: OpenSSH_4.3 pat OpenSSH*
> > debug1: Enabling compatibility mode for protocol 2.0
> > debug1: Local version string SSH-2.0-OpenSSH_3.9p1
> > debug1: SSH2_MSG_KEXINIT sent
> > debug1: SSH2_MSG_KEXINIT received
> > debug1: kex: server->client aes128-cbc hmac-md5 none
> > debug1: kex: client->server aes128-cbc hmac-md5 none
> > debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
> > debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
> >
> > ... after few minutes...
> >
> > Connection closed by 111.111.111.111
> >
> >
> > Any idea what wrong
> >
> >
> > Rami
> >
> >
> >
> > ___
> > Linux-il mailing list
> > Linux-il@cs.huji.ac.il
> > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
> >
> 
> 
> 
> -- 
> Tomer Cohen
> http://tomercohen.com
> 
> H. L. Mencken  - "It is even harder for the average ape to believe that he
> has descended from man."
>  

> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


-- 
The way of the world
Ira Abramov
http://ira.abramov.org/email/

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: another c++ q (with specialization and inheritance )

2009-04-28 Thread Oleg Goldshmidt

Erez, 

None of this is Linux-specific, maybe you should find a good C++
forum, e.g., comp.lang.c++.moderated? However, since you asked, here
is an explanation.

You should understand the difference between definition and
declaration, and also that if you define a template, then instantiate
an object of the templatized class, and then try to specialize the
template it will look as a redefinition of the class to the compiler.

See below.

Erez D  writes:

> i am having problems compiling the following code:
> 
> #if 1
> template  class c1 {};
> template  class c2 : public c1 { public: c2(T &a); };

This is a *definition* of class c2. Below you attempt to redefine
it (rather than specialize it - this is because you instantiate it
before specializing), and the compiler complains.

> #else
> template  class c1;
> template  class c2;

This is a forward declaration of class c2. It is declared but not
yet defined. When this preprocessor branch is active the definition
below is OK.
  
> #endif
> template <> class c1
> {
>     int m_a;
>     public:
>     c1():m_a(0) {};
>     c1(int a):m_a(a) {};
>     c1(int &a):m_a(a) {};
>     void set(const int a) {m_a=a;};
>     const int get(void) const {return m_a;};

The first const is ignored since you are not returning a const
value. The trailing ";" is also ignored (a recurring thing in your
code). But this is irrelevant for the question at hand...
 
>     c2 gen_c2(int a)
>     {
>     c2 ret(a);

This is where you *instantiate* an object of type c2, so you
cannot specialize the template later, as the compiler tells you.

The cure also is logical. Declare the method here, and write the
definition *after* specialization, i.e., put

c2 c1::gen_c2(int a)
{
c2 ret(a);
return ret;
}

immediately before main().
 
>     return ret;
>     }
>     const c1 &operator=(const c1 &other) {set(other.get());
> return *this;};
> };
> template <> class c2 : public c1
> {
> public:
>     c2(int &a):c1(a) {};

I don't think this will compile (when you get to it) - c2 does not
have a c1 member, which is what this notation exists for. Instead,
c1(a) will be automatically called as the base class constructor, so
you only need

  c2(int &a) {}

if I understand your intention correctly.

> };
> int main()
> {
>     c1 a;
>     c2 b=a.gen_c2();

There is no c2 c1::gen_c2(void). There is only c2
c1::gen_c2(int).

> }
> ===
> if i compile it, i get:
> file.cpp:27: error: specialization of ‘c2’ after instantiation

This is a precise statement - you only had to look for instantiation
in your code - see above.

> if on the other hand i change the #if 1 to #if 0, i get:
> file.cpp: In member function ‘c2 c1::gen_c2(int)’:
> file.cpp:20: error: return type ‘struct c2’ is incomplete

Correct again - you have declared, but not defined c2.

Hope it helps,

-- 
Oleg Goldshmidt | p...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: another c++ q (with specialization and inheritance )

2009-04-28 Thread Oleg Goldshmidt
Oleg Goldshmidt  writes:

>>     c2 gen_c2(int a)
>>     {
>>     c2 ret(a);
>
> This is where you *instantiate* an object of type c2, so you
> cannot specialize the template later, as the compiler tells you.

The compiler and Shachar... I was not attentive enough reading his
post, focused on the suggestion to return a pointer... He diagnosed
the problem perfectly, the solution is in my post.

-- 
Oleg Goldshmidt | p...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ssh from 012 cable to server in US fail

2009-04-28 Thread Shay Ohayon
Hello folks,

I am also connected through 012 Cables (HOT) and am unable to connect
(ssh) to servers in The Netherlands and US. Also tried talking to tech
support and they didn't even had a clue.

Please update if any of you got a solution (or any support from any of
the companies).

For the record, I am connecting through LPNS (directly receives dhcp
address from the modem - aka "le lo haigan")

best regards,
shay

2009/4/28 Tomer Cohen :
> Hi,
>
> I had the same issue yesterday evening (012, cable). After few hours I
> periodically tried, I was able to access the machines (one is located in
> Dreamhost, the other at sourceforge.net), but very slowly and with sudden
> disconnections after about one minute of each connection.
>
>
>
> On Tue, Apr 28, 2009 at 11:10, Rami Addady  wrote:
>>
>> Hi,
>>
>>
>> I have weird problem , staring this morning I can't ssh to a server in US,
>>  from some computers that connect to the Internet using 012 cabels.
>>
>> But if I'm ssh to server in 012 farm and then from it to the US server is
>> work fine!
>>
>> I called 012 technical support but they didn't  help me.
>>
>>
>> It's not a FW issue because the ssh session start.
>>
>> When I try to ssh it start and after some time fail , here is debug
>> session.
>>
>>
>> ssh -v -l user 111.111.111.111
>>
>>
>> OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
>>
>> debug1: Reading configuration data /etc/ssh/ssh_config
>> debug1: Applying options for *
>> debug1: Connecting to ... port 22.
>> debug1: Connection established.
>> debug1: identity file /home/user/.ssh/identity type -1
>> debug1: identity file /home/user/.ssh/id_rsa type -1
>> debug1: identity file /home/user/.ssh/id_dsa type -1
>> debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
>> debug1: match: OpenSSH_4.3 pat OpenSSH*
>> debug1: Enabling compatibility mode for protocol 2.0
>> debug1: Local version string SSH-2.0-OpenSSH_3.9p1
>> debug1: SSH2_MSG_KEXINIT sent
>> debug1: SSH2_MSG_KEXINIT received
>> debug1: kex: server->client aes128-cbc hmac-md5 none
>> debug1: kex: client->server aes128-cbc hmac-md5 none
>> debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
>> debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
>>
>> ... after few minutes...
>>
>> Connection closed by 111.111.111.111
>>
>>
>> Any idea what wrong
>>
>>
>> Rami
>>
>>
>>
>> ___
>> Linux-il mailing list
>> Linux-il@cs.huji.ac.il
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
>
> --
> Tomer Cohen
> http://tomercohen.com
>
> H. L. Mencken  - "It is even harder for the average ape to believe that he
> has descended from man."
>
> ___
> Linux-il mailing list
> Linux-il@cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: ssh from 012 cable to server in US fail

2009-04-28 Thread Tzafrir Cohen
On Tue, Apr 28, 2009 at 11:10:30AM +0300, Rami Addady wrote:
> Hi,
>
>
> I have weird problem , staring this morning I can't ssh to a server in  
> US,  from some computers that connect to the Internet using 012 cabels.
>
> But if I'm ssh to server in 012 farm and then from it to the US server  
> is work fine!
>
> I called 012 technical support but they didn't  help me.

Trial and error: what if you use a different port number for the server?

For testing:

  /usr/sbin/sshd -D -p 1234 

-- 
Tzafrir Cohen | tzaf...@jabber.org | VIM is
http://tzafrir.org.il || a Mutt's
tzaf...@cohens.org.il ||  best
ICQ# 16849754 || friend

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il