Score:0

Connect to address xx.x.x.xx port 22: Connection refused

iq flag

I'm trying to connect to a server using ssh command but I have this error

connect to address xx.x.x.xx port 22: Connection refused

I have already checked if ssh is installed, if the port 22 is listening, if ssh is running and I know that the firewall isn't working.

I have two different IPs on the workstation that I'm using as a server, one related to Windows and one related to WSL. If I try the WSL IP the terminal runs forever and than appears "connection timed out".

If I run the ssh command with the "Windows" IP, the terminal says "connect to address xx.x.x.xx port 22: Connection refused".

If I ping the Windows IP it runs. If I try to connect to another server it works. What can I do? Thanks a lot

Digital Lightcraft avatar
in flag
The fact that its stating "Refused" suggests that the server is being contacted but rejecting the connection based on incorrect credentials or it's ACL (or similar)
Helga Cassol avatar
iq flag
I checked the credentials and tried in different ways but I still have this error. How can I check ACL ?
in flag
Your [previous question](https://serverfault.com/questions/1125438/ssh-connect-to-host-172-20-xxx-xx-port-22-connection-timed-out) already showed that you lack understanding of absolute fundamentals. Your question is still off topic here, this site is for professionals. You've been given alternatives where you can ask your questions.
Helga Cassol avatar
iq flag
I've already posted the question on stack overflow and somebody closed the topic because off-topic. I don't have an IT team where I work, I'm a PhD student in a research center and the question is connected to the possibility to work at home, it's not a private thing. Plus I saw similar questions on stack overflow and also in this site so I don't understand why only my question is a problem.
Jevgenij Martynenko avatar
us flag
Stack Overflow is for development (programming) questions. This question is not related to development, hence the reason it was closed
Jevgenij Martynenko avatar
us flag
There are a lot of confusing statements in your question.This is the reason people can't help you. Also, stating that this is related to connecting from home to work makes your question even more confusing. One would need to conduct a mini-interview to understand your setup, intended results and other details. Try asking at SuperUser site, you might have more success there. Or better yet, hire someone to help you if you don't have local IT at your research center
Helga Cassol avatar
iq flag
Thanks for your help I will try there. I've already asked to some people and nobody understood the problem, I have also looked at a lot of similar questions like mine and tried a lot of the solutions. I can understand that my question is confusing but also other questions in this site. I would like to hire someone but I don't have this power sadly. Thanks again.
Jaromanda X avatar
ru flag
is SSH server running on windows or WLS (whatever that is - did you mean WSL)
Helga Cassol avatar
iq flag
Yes sorry, it was a typo. SSH is running.
in flag
You can ask your questions on [su], but you will not be able to solve this without the IT department of your research institute. As an end user your questions are off topic here.
vidarlo avatar
ar flag
There's a [ton of tutorials](https://medium.com/geekculture/enable-ssh-access-into-wsl-from-a-remote-computer-f2e4a962430) on how to ssh into wsl. I would suggest having a look at one of them, and if you have any problems, ask on either AskUbuntu (if you use Ubuntu), or superuser.com.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.