You are not logged in.

#1 2020-06-17 05:27:47

maybenoob
Member
Registered: 2020-06-16
Posts: 13

Cant connect to ssh host[SOLVED]

I am trying to connect to ssh host but when i do

[my_username@archlinux ~]$ ssh bandit0@bandit.labs.overthewire.org -p 2220

the cursor just keep blinking and i dont get any output.

So i did

[my_username@archlinux ~]$ ps -ef | grep sshd
root                     551       1      0 10:23 ?        00:00:00 sshd: /usr/bin/sshd -D [listener] 0 of 10-100 startups
my_username      3941    1754  0 10:48 pts/1    00:00:00 grep sshd

The ssh is up so why i cant connect to the host?

I also checked the server it is working
https://ibb.co/y0Y2kjS



systemctl status sshd:

● sshd.service - OpenSSH Daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2020-06-17 10:23:52 IST; 1h 7min ago
   Main PID: 551 (sshd)
      Tasks: 1 (limit: 9394)
     Memory: 3.1M
     CGroup: /system.slice/sshd.service
             └─551 sshd: /usr/bin/sshd -D [listener] 0 of 10-100 startups

How can i fix this?

Last edited by maybenoob (2020-06-17 12:20:34)

Offline

#2 2020-06-17 05:39:37

stueja
Member
Registered: 2015-10-18
Posts: 47

Re: Cant connect to ssh host[SOLVED]

Please post the output of /etc/sshd_config and iptables -S and systemctl status sshd.

Offline

#3 2020-06-17 06:09:57

maybenoob
Member
Registered: 2020-06-16
Posts: 13

Re: Cant connect to ssh host[SOLVED]

For /etc/sshd_config i get no such file or directory i added the output of rest 2

stueja wrote:

Please post the output of /etc/sshd_config and iptables -S and systemctl status sshd.

Offline

#4 2020-06-17 06:44:25

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Cant connect to ssh host[SOLVED]

I tried your ssh command above and it gives me a login prompt.

Clarification: You don't need the server config for a client problem. Checking your sshd will not do you anything, if you try to be the client for some remote ssh server.

However, the file in question is being owned by the openssh package and should be there. What ssh client do you use?

Last edited by Awebb (2020-06-17 06:45:42)

Offline

#5 2020-06-17 06:55:58

maybenoob
Member
Registered: 2020-06-16
Posts: 13

Re: Cant connect to ssh host[SOLVED]

I use openssh

Awebb wrote:

I tried your ssh command above and it gives me a login prompt.

Clarification: You don't need the server config for a client problem. Checking your sshd will not do you anything, if you try to be the client for some remote ssh server.

However, the file in question is being owned by the openssh package and should be there. What ssh client do you use?

Offline

#6 2020-06-17 06:59:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Cant connect to ssh host[SOLVED]

┌─[Shiv ~]
└─╼ pacman -Fl openssh | grep etc                                                                                                                             
openssh etc/
openssh etc/pam.d/
openssh etc/pam.d/sshd
openssh etc/ssh/
openssh etc/ssh/moduli
openssh etc/ssh/ssh_config
openssh etc/ssh/sshd_config

Paste the output of the ssh command you use with -vvv flag


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2020-06-17 07:12:37

maybenoob
Member
Registered: 2020-06-16
Posts: 13

Re: Cant connect to ssh host[SOLVED]

[my_username@archlinux ~]$ ssh bandit0@bandit.labs.overthewire.org -p 2220 -vvv
OpenSSH_8.3p1, OpenSSL 1.1.1g  21 Apr 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "bandit.labs.overthewire.org" port 2220
debug2: ssh_connect_direct
debug1: Connecting to bandit.labs.overthewire.org [176.9.9.172] port 2220.
jasonwryan wrote:
┌─[Shiv ~]
└─╼ pacman -Fl openssh | grep etc                                                                                                                             
openssh etc/
openssh etc/pam.d/
openssh etc/pam.d/sshd
openssh etc/ssh/
openssh etc/ssh/moduli
openssh etc/ssh/ssh_config
openssh etc/ssh/sshd_config

Paste the output of the ssh command you use with -vvv flag

Offline

#8 2020-06-17 07:20:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Cant connect to ssh host[SOLVED]

ping -c3 bandit.labs.overthewire.org

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2020-06-17 07:23:33

maybenoob
Member
Registered: 2020-06-16
Posts: 13

Re: Cant connect to ssh host[SOLVED]

[@archlinux ~]$ ping -c3 bandit.labs.overthewire.org
PING otw.cracksucht.de (176.9.9.172) 56(84) bytes of data.

--- otw.cracksucht.de ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2023ms
jasonwryan wrote:
ping -c3 bandit.labs.overthewire.org

Offline

#10 2020-06-17 07:26:15

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Cant connect to ssh host[SOLVED]

So, your issue has nothing to do with SSH, it is your networking...

Try pinging google.com and 8.8.8.8 (and there is no need to quote every post someone makes in your thread)...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2020-06-17 07:33:51

maybenoob
Member
Registered: 2020-06-16
Posts: 13

Re: Cant connect to ssh host[SOLVED]

ping google.com
PING google.com (216.58.196.78) 56(84) bytes of data.
^C
--- google.com ping statistics ---
95 packets transmitted, 0 received, 100% packet loss, time 95259ms

ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
126 packets transmitted, 0 received, 100% packet loss, time 126674ms

(Ok i'll take note of that)

Last edited by maybenoob (2020-06-17 07:34:16)

Offline

#12 2020-06-17 07:38:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Cant connect to ssh host[SOLVED]

How did you set up networking on this machine? Please provide details of the packages and configuration steps you went through.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#13 2020-06-17 07:54:29

maybenoob
Member
Registered: 2020-06-16
Posts: 13

Re: Cant connect to ssh host[SOLVED]

I connected to wifi with wifi-menu after that with nmtui>activate a connection and connected to my wifi and i also installed networkmanager,network-manager-applet,wireless_tools,wpa_supplicant.

Last edited by maybenoob (2020-06-17 07:57:14)

Offline

#14 2020-06-17 10:33:17

loqs
Member
Registered: 2014-03-06
Posts: 19,062

Re: Cant connect to ssh host[SOLVED]

What is the output of

find /etc/systemd -name \*.service -type l -a -xtype f -printf %f\\n

Offline

#15 2020-06-17 10:34:58

maybenoob
Member
Registered: 2020-06-16
Posts: 13

Re: Cant connect to ssh host[SOLVED]

loqs

bluetooth.service
dbus-org.bluez.service
org.cups.cupsd.service
NetworkManager-wait-online.service
getty@tty1.service
dbus-org.freedesktop.nm-dispatcher.service
display-manager.service
sshd.service
ufw.service
NetworkManager.service

Offline

#16 2020-06-17 12:21:19

maybenoob
Member
Registered: 2020-06-16
Posts: 13

Re: Cant connect to ssh host[SOLVED]

Fixed it my router firewall was set to high setting it to low fixed my issue.

Offline

Board footer

Powered by FluxBB