Unix/Linux Go Back    


BSD BSD, sometimes called Berkeley Unix, is a Unix operating system developed by the Computer Systems Research Group of the UC Berkeley.

Can't establish outbound ssh connection on an OpenBSD system

BSD


Tags
no route to host, openbsd, ssh

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 03-04-2018   -   Original Discussion by milhan
RudiC's Unix or Linux Image
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 24 April 2018, 1:13 AM EDT
Location: Aachen, Germany
Posts: 12,512
Thanks: 401
Thanked 3,879 Times in 3,566 Posts
Is that a new problem? New system installation? Recent ssh update? Any recent changes?
Is port 22 open and sshd listening on the remote node?
Sponsored Links
    #9  
Old Unix and Linux 03-06-2018   -   Original Discussion by milhan
rbatte1's Unix or Linux Image
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
Join Date: Jun 2007
Last Activity: 25 April 2018, 10:45 AM EDT
Location: Lancashire, UK
Posts: 3,514
Thanks: 1,545
Thanked 691 Times in 621 Posts
So, this is a connection to a public IP address. It could well be one or more of:-
  • There is a firewall at the server side
  • There are PAM rules on the server side to authenticate your client (or proxy) source address. Check https://www.unix.com/what-is-my-ip.php to see what you need to have allowed.
  • There is a NAT or IP tables diverting you elsewhere
  • There is a proxy server either denying access or diverting you somewhere else.


The above list is not exhaustive, but they might give you a start.

A few questions to explore with:-
  • Has this worked from before?
  • Can you test trying to get to it from home?



Robin
The Following User Says Thank You to rbatte1 For This Useful Post:
jim mcnamara (03-06-2018)
Sponsored Links
    #10  
Old Unix and Linux 03-06-2018   -   Original Discussion by milhan
milhan's Unix or Linux Image
milhan milhan is offline
Registered User
 
Join Date: Oct 2002
Last Activity: 26 April 2018, 7:50 AM EDT
Location: New England, USA
Posts: 188
Thanks: 9
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by rbatte1 View Post
So, this is a connection to a public IP address. It could well be one or more of:-

A few questions to explore with:-
  • Has this worked from before?
  • Can you test trying to get to it from home?
This has never worked. I was thinking I wasn't allowed to use outbound ssh, but looks like that wasn't the case.

As I tried to explain it before, I can not ssh out from the server which runs OpenBSD to any other server. Yes, I can ssh from home, or from any other server. I can't make outbound ssh connections from the server which runs OpenBSD.
    #11  
Old Unix and Linux 03-06-2018   -   Original Discussion by milhan
gull04's Unix or Linux Image
gull04 gull04 is offline Forum Advisor  
Registered User
 
Join Date: Dec 2004
Last Activity: 26 April 2018, 4:52 AM EDT
Location: Isle-of-Skye
Posts: 760
Thanks: 21
Thanked 141 Times in 124 Posts
Hi,

There are quite a number of possibilities here, but lets start with the simple things first.
  • Can you ping the OpenBSD system from another system.
  • What result do you get if you run the ssh commands as the root user.
  • From one of your Linux system try telnet host_ip port# so something like telnet 123.123.123.123 22 and post the output.

It is also worth running a traceroute from your Linux system and post the output. For reference you can also run a traceroute to googles servers with traceroute 8.8.8.8 - a comparison of the results may give you a hint.

You could also compare the /etc/networks file with a working system, in case there are any routes defined.

You could also post the output of ifconfig -a check that there is a gateway address assigned.

Regards

Gull04

Last edited by rbatte1; 03-07-2018 at 11:30 AM.. Reason: Added ICODE tags
Sponsored Links
    #12  
Old Unix and Linux 03-19-2018   -   Original Discussion by milhan
milhan's Unix or Linux Image
milhan milhan is offline
Registered User
 
Join Date: Oct 2002
Last Activity: 26 April 2018, 7:50 AM EDT
Location: New England, USA
Posts: 188
Thanks: 9
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by gull04 View Post
  • Can you ping the OpenBSD system from another system.
  • What result do you get if you run the ssh commands as the root user.
  • From one of your Linux system try telnet host_ip port# so something like telnet 123.123.123.123 22 and post the output.
It is also worth running a traceroute from your Linux system and post the output. For reference you can also run a traceroute to googles servers with traceroute 8.8.8.8 - a comparison of the results may give you a hint.

You could also compare the /etc/networks file with a working system, in case there are any routes defined.

You could also post the output of ifconfig -a check that there is a gateway address assigned.
it looks like I can't ping to that OpenBSD system from some other systems. Here is the output from my linux fedora:


Code:
~ ping -c 4 grex.org
PING grex.org (75.61.90.157) 56(84) bytes of data.

--- grex.org ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3105ms

I do not have root privileges on that system.


Code:
~ telnet 75.61.90.157 22
Trying 75.61.90.157...
Connected to 75.61.90.157.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.5
Connection closed by foreign host.



Code:
~ ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
        index 3 priority 0 llprio 3
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 2a:69:d3:eb:66:a0
        index 1 priority 0 llprio 3
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active
        inet 75.61.90.157 netmask 0xffffffc0 broadcast 75.61.90.191
enc0: flags=0<>
        index 2 priority 0 llprio 3
        groups: enc
        status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33188
        index 4 priority 0 llprio 3
        groups: pflog

Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Proxy tunneling failed: ForbiddenUnable to establish SSL connection. charli1 Red Hat 3 05-08-2017 04:02 AM
Connection establish two server Mani T Red Hat 3 11-11-2016 06:01 AM
Establish ODBC connection from Linux Nagaraja Akkiva Shell Programming and Scripting 0 01-31-2014 12:20 AM
Xterm :Cannot establish a connection to "Server IP" on port 22 smartyshan HP-UX 3 06-24-2009 05:11 AM



All times are GMT -4. The time now is 11:35 AM.