Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



 297

SSH Connection Error

by hallowed - 26 September, 2024 - 09:40 AM
This post is by a banned member (hallowed) - Unhide
hallowed  
Registered
87
Posts
12
Threads
4 Years of service
#1
Currently operating on a MacOS, upon attempted connection via SSH I am met with the following:

ssh: connect to host xxx.xx.xxx.xxx port 22: Bad file descriptor

I have created/deleted users recently for OPSec purposes but this error seemingly came out of the blue.

I am finishing a project for a co-worker and cannot complete their request until a connection is established, preferably a Shell instance....

Any ideas on how I can fix this or what may be going on?

Pepe
========================================

Sceptre Intelligence Agency (SI/SIA)
hallowed
Sr. Agent of Administration, Development, Counter-Intelligence, OSINT/HUMINT Operations
---------
  • Certified Cybersecurity Specialist
  • Developer
  • Networking
  • Cyber Forensics
  • Penetration-testing

    STACK: Python, Javascript, HTML, CSS, CPP, Bash/Shell/Typescript, Powershell, Node.JS
This post is by a banned member (MeSvAk) - Unhide
MeSvAk  
Registered
4.014
Posts
3.395
Threads
6 Years of service
#2
(26 September, 2024 - 09:40 AM)hallowed Wrote: Show More
Currently operating on a MacOS, upon attempted connection via SSH I am met with the following:

ssh: connect to host xxx.xx.xxx.xxx port 22: Bad file descriptor

I have created/deleted users recently for OPSec purposes but this error seemingly came out of the blue.

I am finishing a project for a co-worker and cannot complete their request until a connection is established, preferably a Shell instance....

Any ideas on how I can fix this or what may be going on?

Pepe

Typical issues and alternativr issues are bad file number in windows or linux typically its issue with network blockage like fiewall,traffic controll etc
Reason: if the 22 port is getting the connection but it is denied you will get ssh service response anyways

Now the part with mac over years i have been seeing a lot of people that work for me dealing with this issue despite everthing properly being set up correctly andworkinf on other devices like linux and windows some got it to work after mac upgrade or some after some time got it to work my suggestion is to try diffrent device see how it goes

Regards
Mesvak
This post is by a banned member (hallowed) - Unhide
hallowed  
Registered
87
Posts
12
Threads
4 Years of service
#3
(This post was last modified: 26 September, 2024 - 10:36 AM by hallowed.)
I'm pretty sure that I've checked ufw, I will evaluate and respond with any notable events.


(26 September, 2024 - 10:04 AM)MeSvAk Wrote: Show More
(26 September, 2024 - 09:40 AM)hallowed Wrote: Show More
Currently operating on a MacOS, upon attempted connection via SSH I am met with the following:

ssh: connect to host xxx.xx.xxx.xxx port 22: Bad file descriptor

I have created/deleted users recently for OPSec purposes but this error seemingly came out of the blue.

I am finishing a project for a co-worker and cannot complete their request until a connection is established, preferably a Shell instance....

Any ideas on how I can fix this or what may be going on?

Pepe

Typical issues and alternativr issues are bad file number in windows or linux typically its issue with network blockage like fiewall,traffic controll etc
Reason: if the 22 port is getting the connection but it is denied you will get ssh service response anyways

Now the part with mac over years i have been seeing a lot of people that work for me dealing with this issue despite everthing properly being set up correctly andworkinf on other devices like linux and windows some got it to work after mac upgrade or some after some time got it to work my suggestion is to try diffrent device see how it goes

Regards
Mesvak

I can command fine into the hardware, it is specifically this machine that refuses to boot.



(26 September, 2024 - 10:33 AM)hallowed Wrote: Show More
I'm pretty sure that I've checked ufw, I will evaluate and respond with any notable events.


(26 September, 2024 - 10:04 AM)MeSvAk Wrote: Show More
(26 September, 2024 - 09:40 AM)hallowed Wrote: Show More
Currently operating on a MacOS, upon attempted connection via SSH I am met with the following:

ssh: connect to host xxx.xx.xxx.xxx port 22: Bad file descriptor

I have created/deleted users recently for OPSec purposes but this error seemingly came out of the blue.

I am finishing a project for a co-worker and cannot complete their request until a connection is established, preferably a Shell instance....

Any ideas on how I can fix this or what may be going on?

Pepe

Typical issues and alternativr issues are bad file number in windows or linux typically its issue with network blockage like fiewall,traffic controll etc
Reason: if the 22 port is getting the connection but it is denied you will get ssh service response anyways

Now the part with mac over years i have been seeing a lot of people that work for me dealing with this issue despite everthing properly being set up correctly andworkinf on other devices like linux and windows some got it to work after mac upgrade or some after some time got it to work my suggestion is to try diffrent device see how it goes

Regards
Mesvak
========================================

Sceptre Intelligence Agency (SI/SIA)
hallowed
Sr. Agent of Administration, Development, Counter-Intelligence, OSINT/HUMINT Operations
---------
  • Certified Cybersecurity Specialist
  • Developer
  • Networking
  • Cyber Forensics
  • Penetration-testing

    STACK: Python, Javascript, HTML, CSS, CPP, Bash/Shell/Typescript, Powershell, Node.JS
This post is by a banned member (MeSvAk) - Unhide
MeSvAk  
Registered
4.014
Posts
3.395
Threads
6 Years of service
#4
(This post was last modified: 26 September, 2024 - 11:28 AM by MeSvAk.)
(26 September, 2024 - 10:33 AM)hallowed Wrote: Show More
I'm pretty sure that I've checked ufw, I will evaluate and respond with any notable events.


(26 September, 2024 - 10:04 AM)MeSvAk Wrote: Show More
(26 September, 2024 - 09:40 AM)hallowed Wrote: Show More
Currently operating on a MacOS, upon attempted connection via SSH I am met with the following:

ssh: connect to host xxx.xx.xxx.xxx port 22: Bad file descriptor

I have created/deleted users recently for OPSec purposes but this error seemingly came out of the blue.

I am finishing a project for a co-worker and cannot complete their request until a connection is established, preferably a Shell instance....

Any ideas on how I can fix this or what may be going on?

Pepe

Typical issues and alternativr issues are bad file number in windows or linux typically its issue with network blockage like fiewall,traffic controll etc
Reason: if the 22 port is getting the connection but it is denied you will get ssh service response anyways

Now the part with mac over years i have been seeing a lot of people that work for me dealing with this issue despite everthing properly being set up correctly andworkinf on other devices like linux and windows some got it to work after mac upgrade or some after some time got it to work my suggestion is to try diffrent device see how it goes

Regards
Mesvak

I can command fine into the hardware, it is specifically this machine that refuses to boot.



(26 September, 2024 - 10:33 AM)hallowed Wrote: Show More
I'm pretty sure that I've checked ufw, I will evaluate and respond with any notable events.


(26 September, 2024 - 10:04 AM)MeSvAk Wrote: Show More
Typical issues and alternativr issues are bad file number in windows or linux typically its issue with network blockage like fiewall,traffic controll etc
Reason: if the 22 port is getting the connection but it is denied you will get ssh service response anyways

Now the part with mac over years i have been seeing a lot of people that work for me dealing with this issue despite everthing properly being set up correctly andworkinf on other devices like linux and windows some got it to work after mac upgrade or some after some time got it to work my suggestion is to try diffrent device see how it goes

Regards
Mesvak

Im not mac expert and i actually try to avoid it if i can as i said its pretty common thing with mac as an semi enterprise company we have yet to find solution for this as well this is the response from ai i dont know if it helps :
Reset NVRAM/PRAM**:
- Reset the NVRAM/PRAM on the Mac by holding down Command (⌘) + Option (⌥) + P + R keys immediately after turning on the machine. Hold them until you hear the startup sound twice.

5. **Run Disk Utility**:
- If you can access Recovery Mode (hold Command (⌘) + R while booting), open Disk Utility and check the disk for errors. Repair any issues if found.

6. **Check for Peripheral Issues**:
- Disconnect all peripherals (USB drives, external devices, etc.) and try booting again. Sometimes, external devices can interfere with the boot process.

Also have a look at this it might solve your issue https://github.com/microsoft/vscode-remo...ssues/4726
This post is by a banned member (hallowed) - Unhide
hallowed  
Registered
87
Posts
12
Threads
4 Years of service
#5
Hey @MeSvAk,

Thank you for your assistance! These are all highly-intuitive assumptions as to what may have been wrong.

After considerable-effort, I managed to diagnose the issue. The root of the cause was my known_hosts file. I believe this may have been a result of sign-in attempts under variable IP-addresses.

I deleted the attached host and their associated keys as a sort of "restore"-point.

Upon attempted login using known_hosts.old as reference to devise that the issue was, in fact, caused by the known_hosts file and its recent changes, access was granted.

I've had to repeat this process several times, leading me to believe this an issue of IP-connectivity upon alteration of my IP address.


Again, many thanks!
hallowed lol2 @ Sceptre Intelligence (SI/SIA)
========================================

Sceptre Intelligence Agency (SI/SIA)
hallowed
Sr. Agent of Administration, Development, Counter-Intelligence, OSINT/HUMINT Operations
---------
  • Certified Cybersecurity Specialist
  • Developer
  • Networking
  • Cyber Forensics
  • Penetration-testing

    STACK: Python, Javascript, HTML, CSS, CPP, Bash/Shell/Typescript, Powershell, Node.JS
This post is by a banned member (GoobPimplton) - Unhide
10
Posts
2
Threads
1 Year of service
#6
check the sshd logs on the server to see what comes up

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)