Skip to content
You may have a problem trying to forward X11 from your Linux server through a terminal in Windows. I use Bitvise as the ssh client as it also provides the interface for sftp to download/upload the files. Not that using command line scp or sftp is not efficient, but in Windows you may have to install those tools separately.
Since I was trying to avoid installing Cygwin initially, Cygwin terminal wasn’t what I initially consider. Therefore, I went ahead and install Bitvise ssh client (instead of putty), which actually turns out to be quite good. The only problem (at least now) is when trying to forward GUI from the server with X11 forwarding, it failed miserably.
- I’ve tried setting up bitvise in the X11 forward.
- Installed X11-server from Cygwin (finally T_T).
- But X11 forwarding still did not work. I got the error message below.
Failed to open channel for X11 forwarding from [::1]:47396 to 127.0.0.1:6000. Error connecting to X11 server: FlowSocketConnector: Failed to connect to target address. Windows error 10061: No connection could be made because the target machine actively refused it.
I kind of have an idea that this is something to do with Windows Firewall, which does not allow a specific port to listen to an incoming connection. But I haven’t quite figured out what to do. It is actually described on the bitvise page, but I guess I haven’t quite read the whole thing.
In short, after install cygwin X11 server, make sure to run the command below to fix the firewall permission.
C:\cygwin64\bin\XWin -listen tcp -multiwindow
Ref: https://www.bitvise.com/ssh-x11-forwarding
First, make sure X11 is enabled on the server and client side
This should help you make sure it is enabled How to forward X over SSH to run graphics applications remotely?
If using a gui ssh client you can enable X11 forwarding through the settings/preferences.
At this point you should be able to ssh and have the X11 forwarding accepted upon your connection.
However, since you are using windows you need an X11 server
Windows does not have an X11 server installed by default. An X11 server must be installed first.
Here is a guide from bitwise for installing the cygwin x11 server. This should work regardless of the ssh client used.
After installing the server, make sure to run the following command from the guide as your firewall will prevent the connection otherwise.
C:\cygwin64\bin\XWin -listen tcp -multiwindow
This will let you open gui applications with X11 forwarding and enable
To enable Remote Desktop, in my case I was using bitwise SSH Client, here is their guide https://www.bitvise.com/remote-desktop
I have two virtual servers with Ubuntu 16.04 hosted by different providers. After I migrated my desktop from Win7 to Win10 I can not connect to the servers via SSH (see the error messages below). I have tried other operating systems as well:
- Windows 10 and ChromeOS: connection refused
- Windows 7, Android 8, Ubuntu 16.04 (on desktop): connection works
The same application (JuiceSSH) can connect on Android, but returns ‘connection refused’ on ChromeOS.
The error messages:
1. Gitbash (Windows 10)
$ ssh user@myhost
ssh: connect to host myhost port 22: Connection refused
2. Secure Shell (ChromeOS, with -vvv)
Connection with user@myhost is established...
Loading NaCl plug-in... Finished
OpenSSH_7.6p1, OpenSSL 1.0.2k 26 Jan 2017
debug2: resolving "myhost" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to myhost [myip] port 22.
debug1: connect to address myip port 22: Connection refused
ssh: connect to host myhost port 22: Connection refused
NaCl plug-in ended with the status code"255".
3. Bitwise SSH Client (Windows 10)
...
06:34:46.871 Connecting to SSH2 server slejska.de:22.
06:34:47.918 Connection failed. FlowSocketConnector: Failed to connect to target address. Windows error 10061: No connection could be established because the target computer refused the connection.
06:34:47.949 The SSH2 session has been terminated.
Remarks:
- I regenerated OpenSSH host keys on the servers, but without any effect.
- I deactivated the Windows Defender Firewall, but also without any effect.
Solution:
The port 22 was for some computers blocked on the router. It had nothing to do with the operating system. After opening the port for all computers, works everyting perfect. Thanks to @Nathan-McCoy
asked Mar 18, 2018 at 10:21
Antonín SlejškaAntonín Slejška
1,9904 gold badges29 silver badges39 bronze badges
5
Just making my original comment more visible.
Not all systems allow TCP
port 22
by default, which is the default port for ssh
.
Here are some things to try and help find the source of the issue.
Suggestions
Check for open port on client
Run nmap <server>
on the client which wants to connect via ssh.
If port 22
is not shown as open, this may be a firewall issue.
Check for open port on server
Run netstat
on the server to see which ports are open.
If port 22
is not LISTENING
then the ssh daemon is not setup properly.
answered Mar 18, 2018 at 13:39
Nathan McCoyNathan McCoy
3,0921 gold badge25 silver badges47 bronze badges
The error:
Connection Failed. FlowSocketConnector: failed to connect to target address. Windows error 10060. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection because connected host has failed to respond.
I installed ubuntu on an oracle virtual box, and I attempted to connect to the ssh through bitvise and also putty. In both instances I received the same error. I attempted many fixes but with no results whatsoever. I double-checked my IP address and my available ports; I made sure the ssh is enabled and active; I turned off windows firewall; I increased the timer in my bitvise options to 10 seconds, and at one instance to 25 seconds. I restarted the ssh and I also restarted my router as a last resort.
I would highly appreciate any other suggestions/ or further clarifications on what could be the problem.
PS. I’m a newbie. It was yesterday when I learned what a port was.
- Печать
Страницы: [1] Вниз
Тема: Проблема с ssh ! HELP ! (Прочитано 1791 раз)
0 Пользователей и 1 Гость просматривают эту тему.
6246
Всем привет ! Установлена Ubuntu на Win10 (сборка из Windows Store)
собственно проблема с запуском установленного пакета openssh-server (
~$ sudo service ssh —full-restart
* Stopping OpenBSD Secure Shell server sshd [ OK ]
* Starting OpenBSD Secure Shell server sshd sshd: ../sysdeps/posix/getaddrinfo.c:2603: getaddrinfo: Assertion `IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)’ failed.
Aborted (core dumped)
[fail]
andy@DESKTOP-ICD5868:~$
Подскажите как исправить проблему ? Переустановка пакета — не помогла !
доступа -нет !!!
15:37:04.390 Current date: 2017-07-17
15:37:04.390 Bitvise SSH Client 7.32, a fully featured SSH client for Windows.
Copyright (C) 2000-2017 by Bitvise Limited.
15:37:04.390 Visit www.bitvise.com for latest information about our SSH software.
15:37:04.390 Run ‘BvSsh -help’ to learn about supported command-line parameters.
15:37:04.390 Cryptographic provider: Windows CNG (x86) with additions
15:37:04.858 Loading default profile.
15:37:06.710 Started a new SSH2 session.
15:37:06.788 Connecting to SSH2 server 127.0.0.1:22.
15:37:07.810 Connection failed. FlowSocketConnector: Failed to connect to target address. Windows error 10061: Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение.
15:37:07.846 The SSH2 session has been terminated.
15:37:15.237 Copying log to clipboard succeeded.
andy@DESKTOP-ICD5868:~$ sudo service ssh start
* Starting OpenBSD Secure Shell server sshd sshd: ../sysdeps/posix/getaddrinfo.c:2603: getaddrinfo: Assertion `IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)’ failed.
Aborted (core dumped)
[fail]
andy@DESKTOP-ICD5868:~$ sudo service ssh status
* sshd is not running
andy@DESKTOP-ICD5868:~$
« Последнее редактирование: 17 Июля 2017, 16:01:07 от 6246 »
ConnaiSSant
С чего вы решили написать на этот форум? Вам к разработчикам этого ПО (кто собирал) Установите Ubuntu по нормальному и тогда пишите сюда. Вы сейчас хотите решить проблему в windows на linux форуме.
6246
С чего вы решили написать на этот форум? Вам к разработчикам этого ПО (кто собирал) Установите Ubuntu по нормальному и тогда пишите сюда. Вы сейчас хотите решить проблему в windows на linux форуме.
проблема то именно стандартного пакета для Ubuntu ! Вот и написал тут )
Попробую конечно на windows форумах поискать помощи !
toZen
Правила форума
2. На форуме ЗАПРЕЩЕНО
2.17. Обсуждение вопросов, напрямую не связанных с использованием дистрибутивов, входящих в официальное семейство Ubuntu. Другие дистрибутивы GNU/Linux и прочие операционные системы следует обсуждать на иных, специализированных ресурсах. Исключением является раздел «Разговоры обо всем».
Закрыто
- Печать
Страницы: [1] Вверх