Score:0

Linux 20.04 to MobaXterm Connection Refused Problem

tk flag

I am trying to connect Ubuntu Linux 20.04 to MobaXterm with SSH. I tried everything but MobaXterm gives error as "Network error: Connection refused"

I have just started to learn Linux, I am taking a lot of problem but I didn't handle this one.

What is the problem on my Linux?

Thanks in advance.

SSH

ssh 127.0.0.1

Reply

 Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.15.0-56-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

0 updates can be applied immediately.

New release '22.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Your Hardware Enablement Stack (HWE) is supported until April 2025.
Last login: Fri Dec 23 23:12:49 2022 from 127.0.0.1
  • I didn't see any problem here.

LISTEN

sudo lsof -i -n -P | grep LISTEN

Reply

systemd-r  491 systemd-resolve   13u  IPv4  19124      0t0  TCP 127.0.0.53:53 (LISTEN)
cupsd      568            root    6u  IPv6  22865      0t0  TCP [::1]:631 (LISTEN)
cupsd      568            root    7u  IPv4  22866      0t0  TCP 127.0.0.1:631 (LISTEN)
sshd       687            root    3u  IPv4  25177      0t0  TCP *:22 (LISTEN)
sshd       687            root    4u  IPv6  25179      0t0  TCP *:22 (LISTEN)

Ssh Status

systemctl status sshd

Reply

* ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-12-23 23:18:05 +03; 17min ago
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 674 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
   Main PID: 687 (sshd)
      Tasks: 1 (limit: 18658)
     Memory: 7.3M
     CGroup: /system.slice/ssh.service
             `-687 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

Warning: some journal files were not opened due to insufficient permissions.

Local Ports

ss -plnt
State              Recv-Q             Send-Q                         Local Address:Port                           Peer Address:Port             Process             
LISTEN             0                  4096                           127.0.0.53%lo:53                                  0.0.0.0:*                                    
LISTEN             0                  128                                  0.0.0.0:22                                  0.0.0.0:*                                    
LISTEN             0                  5                                  127.0.0.1:631                                 0.0.0.0:*                                    
LISTEN             0                  128                                     [::]:22                                     [::]:*                                    
LISTEN             0                  5                                      [::1]:631                                    [::]:*          

UNF STATUS

sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere                  
22                         ALLOW       Anywhere                  
2222/tcp                   ALLOW       Anywhere                  
22/tcp (v6)                ALLOW       Anywhere (v6)             
22 (v6)                    ALLOW       Anywhere (v6)             
2222/tcp (v6)              ALLOW       Anywhere (v6)

PING

ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.039 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.056 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.040 ms

MobaXterm Connection Problem

MobaXterm Connection Problem

Terrance avatar
id flag
Welcome to AskUbuntu! Your question is very hard to follow since you have shown that everything on your Ubuntu install is working fine. I would suggest cleaning up your question and actually showing how you are not able to connect to MobaXterm or that MobaXterm cannot connect to 127.0.0.1. Thank you!
Terrance avatar
id flag
If you edit your host or mouse over it in MobaXterm it shows Host: 127.0.0.1, correct?
Score:1
zm flag

I solved this by editing my WSL session in MobaXterm and changing the "Run method" from "Localhost connection" to "Autodetection".

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.