Can't establish outbound ssh connection on an OpenBSD system


 
Thread Tools Search this Thread
Operating Systems BSD Can't establish outbound ssh connection on an OpenBSD system
# 8  
Old 03-04-2018
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?
# 9  
Old 03-06-2018
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
This User Gave Thanks to rbatte1 For This Post:
# 10  
Old 03-06-2018
Quote:
Originally Posted by rbatte1
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 03-06-2018
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 12:30 PM.. Reason: Added ICODE tags
# 12  
Old 03-19-2018
Quote:
Originally Posted by gull04
  • 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

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

Unable to establish connection over TLS 1.2 on AIX 7.1/7.2

Hello Team, I would need your help to enable communication over TLS1.2 on AIX 7.1 or 7.2 with IBM JDK 1.8 latest update. By default, the request is trying to establish a connection over TLSv1 even though TLS 1.2 is explicitly enabled on server as well as on Java 8. The openssl command throws... (4 Replies)
Discussion started by: Naina2019
4 Replies

2. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

Hi, I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not... I have .sh script like below and i have servers.txt contains all the list of servers #/bin/bash for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies

3. BSD

Connection SSH to remote by ssh

Hello guys! I am setting up a script to access a unix remote server. My problem is that when I put the ssh line "my host", the script does not wait for the server response asking for the password to execute the line in which I put the password, that is, I need to put a form in which script has a... (1 Reply)
Discussion started by: aroucasp
1 Replies

4. Red Hat

Proxy tunneling failed: ForbiddenUnable to establish SSL connection.

Tryied both ways curl and wget wget --no-check-certificate https://mysitet.it:61617 --2017-05-05 17:29:02-- https://mysitet.it:61617/ Connecting to myproxy:8080... connected. Proxy tunneling failed: ForbiddenUnable to establish SSL connection. curl https://mysite.it:61617 curl: (56)... (3 Replies)
Discussion started by: charli1
3 Replies

5. Red Hat

Connection establish two server

How do make connection between two linux server.Such as SSH,rsync,ftp (3 Replies)
Discussion started by: Mani T
3 Replies

6. Shell Programming and Scripting

Establish ODBC connection from Linux

Hi All, I want to establish a ODBC connection to a database from linux and query the tables of a database. Please let me know how I can achieve this. Thanks and Regards Nagaraja Akkivalli. (0 Replies)
Discussion started by: Nagaraja Akkiva
0 Replies

7. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

8. HP-UX

Xterm :Cannot establish a connection to "Server IP" on port 22

Dears, I installed HP-UX Server, when I tried to reach it through Xterm it returns the error like Xrcmd Cannot establish a connection to "Server IP" on port 22 Anyone here to tell me the reason(s) find attached xterm.jpg (3 Replies)
Discussion started by: smartyshan
3 Replies
Login or Register to Ask a Question