Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Problem with ssh...

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Problem with ssh...

#1 Post by phoenix_art »

Dear People!

Could anyone help me with ssh-problem? I have two Debian-servers with ssh-connection, but nowadays when I connect and try command "top" or run "mc" it started loading the screen and stuck with half screen and freeze.

It happened with all ssh-clients - with Linux and Windows machines too.

Thanks for help!

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Problem with ssh...

#2 Post by debiman »

from a graphical terminal (urxvt) i can ssh into my server, and run 'top' with no problem:

Code: Select all

ssh server
Last login: Sun Mar 25 13:32:06 2018 from bla.bla.com
$ top
...
how do you log in exactly?
does top not give any sort of error message?

phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Re: Problem with ssh...

#3 Post by phoenix_art »

I tried with your ssh-mode - from terminal with ssh - but here is the same problem, when I run top, listed the half of top-display.

Before I usually used Vinagre and Remmina on Linux.

On irc I got a possible answer from someone today, maybe the firewall of server is blocking icmp responses. But I can't repair it yet - I don't know how. A long time I hadn't do any setup with the server, and before I can use ssh everyday without problems. What happened then? Maybe some security update?

Thanks for helping.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Problem with ssh...

#4 Post by debiman »

phoenix_art wrote:I tried with your ssh-mode - from terminal with ssh - but here is the same problem, when I run top, listed the half of top-display.
so you don't get any sort of error message? can you Ctrl-C out of it?
is only top affected? what other problematic behavior do you experience?
there must be something you can show us.
Before I usually used Vinagre and Remmina on Linux.
ah, a server with a GUI. i see where you're coming from.
On irc I got a possible answer from someone today, maybe the firewall of server is blocking icmp responses. But I can't repair it yet - I don't know how. A long time I hadn't do any setup with the server, and before I can use ssh everyday without problems. What happened then? Maybe some security update?
that sounds overly convoluted for a problem so poorly described.
right now i'd rather expect that your terminal is meesed up, but hard to say anything unless you provide any real info.

phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Re: Problem with ssh...

#5 Post by phoenix_art »

"so you don't get any sort of error message? can you Ctrl-C out of it?" -> No, I don't get any error message, and can't use Ctrl-C to exit.

"ah, a server with a GUI. i see where you're coming from." -> "It happened with all ssh-clients - with Linux and Windows machines too." -> I use Vinagre and Remmina on Linux Desktop computer not on the server!

"i see where you're coming from." -> So, where?? If you wouldn't help me, please don't do that... :roll:

"On irc I got a possible answer from someone today, maybe the firewall of server is blocking icmp responses. But I can't repair it yet - I don't know how. A long time I hadn't do any setup with the server, and before I can use ssh everyday without problems. What happened then? Maybe some security update?" -> And thanks for reading this and help me... Oh, you maybe just stuck on this: "i see where you're coming from". Thanks for your disparage...

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: Problem with ssh...

#6 Post by reinob »

phoenix_art wrote: Could anyone help me with ssh-problem? I have two Debian-servers with ssh-connection, but nowadays when I connect and try command "top" or run "mc" it started loading the screen and stuck with half screen and freeze.
Try, from a linux client (to avoid any further complications) with the "-v" (verbose) option, i.e.

Code: Select all

$ ssh -v user@server
then wait until your problem happens and see if anything is printed from ssh.
If your session hangs, then hit "~." (without the quotes). This should terminate the session.
If it doesn't, then maybe your client is the problem.

phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Re: Problem with ssh...

#7 Post by phoenix_art »

Hi reinob,

Thanks for the tip! I tried as you mention, now it was ok without hang, but as I wrote before here there was the hanging-problem with terminal ssh-command too. I don't know why, it sometimes working without hanging with the client-softwares too - without any changes on the server or client. In different times I got hangs with top or opening Midnight Commander.

I will try this tip later for get any error message when hanging and will write here.

phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Re: Problem with ssh...

#8 Post by phoenix_art »

"then wait until your problem happens and see if anything is printed from ssh." -> Hanged after your command line: ssh -v user@server but nothing printed on the screen.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Problem with ssh...

#9 Post by debiman »

and you did this on a debian terminal?

did you literally enter

Code: Select all

ssh -v user@server
???
you know you're supposed to replace "user@server" with your actual user and server, yes?
anyhow, it must have output something.
you can crank up verbosity iirc, e.g.:

Code: Select all

ssh -vv user@server
ssh -vvv user@server

phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Re: Problem with ssh...

#10 Post by phoenix_art »

"you know you're supposed to replace "user@server" with your actual user and server, yes?" -> Oh, my God... Of course, YES! :)

Any other idea? :)

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Problem with ssh...

#11 Post by debiman »

phoenix_art wrote:"you know you're supposed to replace "user@server" with your actual user and server, yes?" -> Oh, my God... Of course, YES! :)
so, are you being facetious right now?
you still aren't providing any useful information.
maybe we should send a delegation to your place to
a) assess your sense of humour
b) do some actual troubleshooting
???

edit:
ok, now it's me being facetious.
i hope my sarcasm is apparent enough.
couldn't quite tell from your last post...

n_hologram
Posts: 459
Joined: 2013-06-16 00:10

Re: Problem with ssh...

#12 Post by n_hologram »

top and midnight commander both use ncurses, yes? Maybe the issue is with their library files or something. You could try reinstalling the ncurses libs just for funsies.

You say you have two servers...is this happening on both of them? (If we're being honest, I'd be really surprised if your answer was "yes".)

Speaking of your servers, if you have physical access to them, plug in a monitor and keyboard and try to run them from physical components, not through ssh. If the problem persists, then it clearly isn't an ssh issue.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
the crunkbong project: scripts, operating system, the list goes on...

jibberjabber
Posts: 162
Joined: 2016-01-10 16:58

Re: Problem with ssh...

#13 Post by jibberjabber »

anyhow, it must have output something.
So what is the out put ?
Example only:

Code: Select all

$ ssh -v user@server
OpenSSH_6.0p1 Debian-4+deb7u4, OpenSSL 1.0.1t  3 May 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
ssh: Could not resolve hostname server: Name or service not known
$ 
There should be some output, and it might give a clue as to why it does not connect.
Do you know how to capture the output ?
written by HelpBot#8453
Alias jibberjabber
I am sorry, my english is not that good, and I sometimes have other problems,so my response might not be perfect.
N5RLX > "Jibber jabber ,all day and all night, jibber jabber jibber jabber"

phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Re: Problem with ssh...

#14 Post by phoenix_art »

"There should be some output, and it might give a clue as to why it does not connect." -> Thanks for help but I think you didn't understand my problem. I always can connect to the server over ssh from any modes, but when I give something there - exactly "top" command, or wanted to run Midnight Commander it sometimes trying to load its output screen and leave the output screen with half-loaded with freeze.

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: Problem with ssh...

#15 Post by reinob »

@phoenix_art,

I understand it's hard, but you're not really providing any relevant information that may help us diagnose your problem.

Can you post, for both the client and the server:
* Debian version you're using (output of cat /etc/debian_version will do)
* output of apt-cache policy openssh-client openssh-server

To be on the safe side, please post the output of "ip a", "ip r" and "arp -n" on both the client and the server.
I once had a similar issue due to misconfigured routing.

Please also confirm that you're not testing this using any Windows client, Windows server, RDP, VNC or anything other than good old Debian Linux using OpenSSH. Not in a VM, not in WSL, just plain bare-metal Linux and OpenSSH. OK?

n_hologram
Posts: 459
Joined: 2013-06-16 00:10

Re: Problem with ssh...

#16 Post by n_hologram »

@OP: reinob offered some good advice. I will also request some information, one final time...

Since you've had nothing but failures through your ssh clients, it is incredibly plausible that the issue lies with the server. Please run top and mc on the physical device (hooked up to a monitor), not through ssh[/i], and report back letting us know either:
a) if top/mc works or fails on the physical device directly, or
b) if you don't have access to the device. Even if you don't have access, it is still a very important thing to know for people who are trying to help you.

Other conjectures based on superficial search results:
Is your server a raspberry pi?
Have you tried adding the -t option to your ssh command?
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
the crunkbong project: scripts, operating system, the list goes on...

phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Re: Problem with ssh...

#17 Post by phoenix_art »

On Debian-clients:

$ cat /etc/debian_version
9.4

$ apt-cache policy openssh-client openssh-server
openssh-client:
Telepítve: 1:7.4p1-10+deb9u3
Jelölt: 1:7.4p1-10+deb9u3
Verziótáblázat:
*** 1:7.4p1-10+deb9u3 500
500 http://ftp.hu.debian.org/debian stretch/main amd64 Packages
500 http://deb.debian.org/debian stretch/main amd64 Packages
100 /var/lib/dpkg/status
openssh-server:
Telepítve: (nincs)
Jelölt: 1:7.4p1-10+deb9u3
Verziótáblázat:
1:7.4p1-10+deb9u3 500
500 http://ftp.hu.debian.org/debian stretch/main amd64 Packages
500 http://deb.debian.org/debian stretch/main amd64 Packages

On Debian-servers:

$ cat /etc/debian_version
9.1

$ apt-cache policy openssh-client openssh-server
openssh-client:
Telepítve: 1:6.7p1-5+deb8u4
Jelölt: 1:6.7p1-5+deb8u4
Verziótáblázat:
*** 1:6.7p1-5+deb8u4 0
500 http://ftp.hu.debian.org/debian/ jessie/main amd64 Packages
500 http://http.debian.net/debian/ jessie/main amd64 Packages
100 /var/lib/dpkg/status
1:6.7p1-5+deb8u3 0
500 http://security.debian.org/ jessie/updates/main amd64 Packages
500 http://security.debian.org/debian-security/ jessie/updates/main amd64 Packages
openssh-server:
Telepítve: 1:6.7p1-5+deb8u4
Jelölt: 1:6.7p1-5+deb8u4
Verziótáblázat:
*** 1:6.7p1-5+deb8u4 0
500 http://ftp.hu.debian.org/debian/ jessie/main amd64 Packages
500 http://http.debian.net/debian/ jessie/main amd64 Packages
100 /var/lib/dpkg/status
1:6.7p1-5+deb8u3 0
500 http://security.debian.org/ jessie/updates/main amd64 Packages
500 http://security.debian.org/debian-security/ jessie/updates/main amd64 Packages

I don't know why, but today I don't get the same hang/freeze with top or mc. I didn't make any changes on the server.

phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Re: Problem with ssh...

#18 Post by phoenix_art »

"you still aren't providing any useful information." -> "On irc I got a possible answer from someone today, maybe the firewall of server is blocking icmp responses. But I can't repair it yet - I don't know how." -> I still didn't get one possible help for it here yet... Why?

debiman wrote:
phoenix_art wrote:"you know you're supposed to replace "user@server" with your actual user and server, yes?" -> Oh, my God... Of course, YES! :)
so, are you being facetious right now?
you still aren't providing any useful information.
maybe we should send a delegation to your place to
a) assess your sense of humour
b) do some actual troubleshooting
???

edit:
ok, now it's me being facetious.
i hope my sarcasm is apparent enough.
couldn't quite tell from your last post...

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: Problem with ssh...

#19 Post by reinob »

phoenix_art wrote:"you still aren't providing any useful information." -> "On irc I got a possible answer from someone today, maybe the firewall of server is blocking icmp responses. But I can't repair it yet - I don't know how." -> I still didn't get one possible help for it here yet... Why?
In principle (and AFAIK anyway) ssh does not use or need ICMP. From what you posted above your client (stretch) and server (jessie) should be OK.

I'd tend to assume that the problem is with your internet connection (whether client, server, or both.. I can't know), which would be beyond the scope of what any of us can help with.

My last suggestion would be to check/confirm whether you have any kind of network "tweaks" (like changing the MTU or any such low-level networking parameters which nobody besides the kernel should be touching..)

Can you confirm that you didn't mess (up) with your network? does each client and each server have a single IP address and a single interface (I think I asked you to post the output of "ip a", "ip r" and "arp -n" on both client and server).

phoenix_art
Posts: 134
Joined: 2013-12-08 17:47
Has thanked: 1 time

Re: Problem with ssh...

#20 Post by phoenix_art »

Thanks again for your help. I see now ssh working without problems I mentioned since last few days from any client I tried. I don't know why and what was the problem but as I wrote my network and server didn't get any changes.

Post Reply