Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nethunter kex connection faild or error #168

Open
me96 opened this issue Aug 2, 2020 · 65 comments
Open

Nethunter kex connection faild or error #168

me96 opened this issue Aug 2, 2020 · 65 comments

Comments

@me96
Copy link

me96 commented Aug 2, 2020

When I am using nethunter kex gui after sometime it comes connection faild how can I solve this problem

@mpotane
Copy link

mpotane commented Aug 6, 2020

Try changing the port to 5902... also check if vncserver is started in termux .. then vnc start in nethunter

@me96
Copy link
Author

me96 commented Aug 6, 2020

Its not working in the time of using nethunter kex for GUI then after sometime it comes an error or connection faild and termux also closed automatically and kills the session how can I slove these problems

@Varun407
Copy link

First type these commands in termux:
'nethunter kex &'
That will show the port that you have to connect.
And open kex and set that port you have previously seen.
And then connect.

@nadirchine
Copy link

If you are rooted ( not using Termmux), just go to /data/local/Kalinh/root/ then delete the folder called "./vnc". After that you will be able to use nethunter KEX after setting password from terminal by typing: vncserver.

@nadirchine
Copy link

Finally I found the solution of this crazy problem... because I am rooted, I used root explorer App to navigate to this folder /data/local/kali/root/, then I removed the folder called “.vnc”, and here we go ... after all, we can create our vnc server only from kali terminal by typing vncserver 😍😍😍 enjoy!

@me96
Copy link
Author

me96 commented May 10, 2021

But the device is not rooted is it possible to overcome with that problem

@me96
Copy link
Author

me96 commented May 10, 2021

First type these commands in termux:
'nethunter kex &'
That will show the port that you have to connect.
And open kex and set that port you have previously seen.
And then connect.

But its not working

@nadirchine
Copy link

But the device is not rooted is it possible to overcome with that problem

If you are not rooted (work with Termux), just follow:

1- long press the termux app and go Press "Force stop"
2- open termux app
3- again make new password for nethunter kex just type "nethunter kex passwd"
4- after you set the password type "nethunter kex &"

  • it will reset and give you a new port for nethunter kex app
    5- go to nethunter kex app and set the port and put the password
    It works perfectly fine :)

@me96
Copy link
Author

me96 commented May 10, 2021

But the device is not rooted is it possible to overcome with that problem

If you are not rooted (work with Termux), just follow:

1- long press the termux app and go Press "Force stop"
2- open termux app
3- again make new password for nethunter kex just type "nethunter kex passwd"
4- after you set the password type "nethunter kex &"

  • it will reset and give you a new port for nethunter kex app
    5- go to nethunter kex app and set the port and put the password
    It works perfectly fine :)

No bro its not working after some time its showing connection failed and there is acknowledged bottom then I am coming to nethuntetkex home screen
Then I am again tried to connect its shows some ECONNREFUSED (connection refused)
Try to solve this problem

@AnnonymousTing
Copy link

hey can you fix fail to download and need to download it manually

@Danielxxxgek
Copy link

Nothing is working 😔

@aioont
Copy link

aioont commented Feb 4, 2022

Let me know these work ?

It's properly working on kali linux rootless on android.

https://github.com/aioont/kex

If your error still exist,then try these

cd ~/.vnc/
rm -rf *.log *.pid
cd /
rm -rf /tmp/.X* /tmp/.xfsm* /tmp/.l2s* /tmp/.ICE-unix
vncserver -kill :*
vncserver -depth 24 -geometry 1920x1080 :1

//Removing log pid files in ~/.vnc directory
//Removing some files and directories under /tmp

@LORD-Zenix
Copy link

Why do I always use the "nethunter" command but it doesn't work
nethunter: command not found

@aioont
Copy link

aioont commented Jun 27, 2022

Why do I always use the "nethunter" command but it doesn't work

• To start Kali NetHunter command line interface
• The command nethunter can be abbreviated to nh.
• nethunter kex &
start Kali NetHunter Desktop Experience user sessions

nethunter: command not found

Check a file nethunter exist on folder /data/data/com.termux/files/usr/bin

If it is not there follow these step :
https://github.com/aioont/kex

1: Just download nethunter
wget https://raw.githubusercontent.com/aioont/kex/main/nethunter.sh

2: Setup permission
chmod +x nethunter.sh

3: Rename and move files to required location

mv nethunter.sh nethunter && mv nethunter /data/data/com.termux/files/usr/bin

Hope it helps...

@lloydclyde
Copy link

When I am using nethunter kex gui after sometime it comes connection faild how can I solve this problem

Even mine is also saying the same thing.after it works for about a minute.same errors repeats itself."error connection "

@lloydclyde
Copy link

What can I do to overcome this continously showing error.termux show me signal completed signal 9,from knowhere then awaits for me to press enter for it to close.the kex app will then show the error code no connection.tried all the tutorials online.but the error code keeps showing.in no root nethunter

@aioont
Copy link

aioont commented Sep 22, 2022

I think this issue still exists and its not solved.Please provide screenshot may be anybody can help you ?
I don't know the solution but try this steps :
#168 (comment)

#168 (comment)

Turn off power saving option, optimization for termux and nethunter kex app ( vnc). Allow background activity (temporarily,switch back to normal if it doesn't work).

Please share Android version also.

I have also facing issue with connection automatically closed during minimize or switching between apps.

Check whether connection keep going ?

After running nethunter kex start connect to kex(vnc)
and do not minimize or switch apps.Stay inside the vnc apps.

Still the connection closed automatically ?

I don't know what next to do .

@aioont aioont mentioned this issue Sep 23, 2022
@aioont
Copy link

aioont commented Sep 23, 2022

#168 (comment)

I think you followed this and error still exist.The reason is that Android OS kill termux because of PhantomProcessRecord.killLocked().

Please refer to this :
https://m.youtube.com/watch?v=jSHpmvfNUUA

termux/termux-app#2366

RandomCoderOrg/ubuntu-on-android#110

https://youtu.be/tB7b-YCSghQ

Android OS kills the process causing to termination.
I am not a expert at this but try the first YouTube video solution.
I think lower Android version can run termux without problem.

I'm using Android 11 , facing connection failed when I switch or minimize apps.

Ask questions in more active discussion page and someone can help you to fix this problem.

Update :

I checked kali nethunter rootless on Android Version 9 today and it works perfectly.Closed termux (without exiting) there is no problem with connection.

@CitizenPrayer
Copy link

Has anyone found a solution to this? I still can't get it to work on my rootless galaxy note 10+

@SaheelKumarSingh
Copy link

I faced the same problem of kex not working when i installed a vnc server and tried to reach linux through vnc.. I tried every possible way to run kex but it didn't work, so at the end I deleted termux, installed it again and did the entire installation process and now it is working.

I guess, kex not responding or error in kex depends upon the nature of mistake done by us, knowingly or unknowingly. The best option according to me is to just reinstall and run the entire installation process again but if it still doesn't work, then I guess, using termux, you will have to delete all the installations of 'wget' and all other softwares installed initially, from the core and again try to install it fresh.

Please do tell me if this works. Thanks.

@aioont
Copy link

aioont commented Jan 20, 2023

I faced the same problem of kex not working when i installed a vnc server and tried to reach linux through vnc.. I tried every possible way to run kex but it didn't work, so at the end I deleted termux, installed it again and did the entire installation process and now it is working.

I guess, kex not responding or error in kex depends upon the nature of mistake done by us, knowingly or unknowingly. The best option according to me is to just reinstall and run the entire installation process again but if it still doesn't work, then I guess, using termux, you will have to delete all the installations of 'wget' and all other softwares installed initially, from the core and again try to install it fresh.

Please do tell me if this works. Thanks.

aioont/kex#3

https://github.com/aioont/kex

Hope it help someone :)

@Arham2006
Copy link

They shows
Command not found

@aioont
Copy link

aioont commented Feb 4, 2023

They shows
Command not found

Please provide more details

What error you are getting or screenshot will be more helpful

If you are getting nethunter command not found then refer to :
#168 (comment)

If you are facing error associated with kex and nethunter follow
https://github.com/aioont/kex

@Adyextreme01
Copy link

the issue is simple to be resolve
1 type nh
2 type tigervncserver
3 check on wich port it is running
4 type exit
5 type nethunter kex &
hope that resoleves the issue

@hackar109
Copy link

Can I use Android 12 in using nethunter

@Kmcc0014
Copy link

the issue is simple to be resolve
1 type nh
2 type tigervncserver
3 check on wich port it is running
4 type exit
5 type nethunter kex &
hope that resoleves the issue

What was that supposed to do? Didn’t change anything

@aioont
Copy link

aioont commented Feb 25, 2023

Please provide more details

What error you are getting or screenshot will be more helpful

If you are facing error associated with kex and nethunter follow
https://github.com/aioont/kex

@aioont
Copy link

aioont commented Feb 25, 2023

Can I use Android 12 in using nethunter

Please read this :
#168 (comment)

Install and check it works properly
Give it a try :)

@xdeadlyangelx
Copy link

What can I do to overcome this continously showing error.termux show me signal completed signal 9,from knowhere then awaits for me to press enter for it to close.the kex app will then show the error code no connection.tried all the tutorials online.but the error code keeps showing.in no root nethunter

In termux, do you have the screen set to stay on? If not, you can set it by long pressing in termux, select "more", and check the "keep screen on" box. I think that's why I had a similar problem. Hope it helps.

@aioont
Copy link

aioont commented Jun 1, 2023

please help 😭😞🙏 guys this is what am facing
┌──(kali㉿localhost)-[~] └─$ whoami
kali

┌──(kali㉿localhost)-[~]
└─$ ls

┌──(kali㉿localhost)-[~]
└─$ kex
/usr/bin/kex: line 19: vncserver: command not found
/usr/bin/kex: line 20: vncserver: command not found
/usr/bin/kex: line 25: vncpasswd: command not found /usr/bin/kex: line 30: vncserver: command not found

Error starting the KeX server.
Please try "nethunter kex kill" or restart your termux session and try again.

┌──(kali㉿localhost)-[~]
└─$

The error message suggests that the required commands, such as vncserver and vncpasswd, are not found on your system.

1.Ensure that you have installed the necessary packages: Make sure that you have installed the required VNC server packages on your Kali Linux system. You can do this by running the following command:

sudo apt-get install tightvncserver

2.Verify the VNC server installation: After installing the tightvncserver package, make sure that the vncserver command is available. You can check this by running the following command:

vncserver

3.If the command is recognized and a VNC server is started, proceed to the next step. Otherwise, please check your installation and ensure that the vncserver command is correctly installed.

4.Restart your Termux session: If you are running Kali Linux in Termux on an Android device, you can try restarting your Termux session and attempt running the kex command again.

5.Use the correct command: It seems that you are running the kex command, which is not recognized. To start the KeX server in Kali Linux, the correct command is nethunter kex. You can try running the following command

nethunter kex

If nothing works follows this repository and reinstall kex and nethunter

https://github.com/aioont/kex

@logobg
Copy link

logobg commented Jul 12, 2023

youtu. be/vZBUI3wMU5Q

@Sora-5653
Copy link

It is black out, how to fix it? I've done the install step perfectly ofc.
Uploading Screenshot_2023-07-24-23-13-48-588_com.realvnc.viewer.android.jpg…

@aioont
Copy link

aioont commented Jul 24, 2023 via email

@brcthdrgn
Copy link

brcthdrgn commented Jul 24, 2023 via email

@Tadvidharmesh
Copy link

When I am using nethunter kex gui after sometime it comes connection faild how can I solve this problem

@yutenli14
Copy link

yutenli14 commented Sep 27, 2023

please help me
my problem is kali can't apt update and nethunter kex long in is not working dbus-launch

Screenshot_20230927-152954.png

Screenshot_20230927-153059.png

Screenshot_20230927-153250.png

Screenshot_20230927-153334.png

@Adyextreme01
Copy link

your issue is related to dns errors try to set your dns server s 8.8.8.8 8.8.4.4

@sumitmusale07
Copy link

Can't update but i can ping to Google , what's problem here ..?
I also tried setting dns to 8.8.8.8 etc but it doesn't fix this issue, I'm on Android 10

@Hooleymass
Copy link

Hooleymass commented Dec 4, 2023

Can't update but i can ping to Google , what's problem here ..? I also tried setting dns to 8.8.8.8 etc but it doesn't fix this issue, I'm on Android 10

I HAD SAME ISSUE and I added the dns to the resolv.conf file
┌──(kali㉿localhost)-[~]
└─$ sudo nano /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

@Lokiamv
Copy link

Lokiamv commented Dec 21, 2023

If you are rooted ( not using Termmux), just go to /data/local/Kalinh/root/ then delete the folder called "./vnc". After that you will be able to use nethunter KEX after setting password from terminal by typing: vncserver.

Screenshot_2023-12-22-02-26-07-018_com offsec nhterm-edit
It's no working I think I need password but where can I get?

@githubUSER5kr
Copy link

What can I do to overcome this continously showing error.termux show me signal completed signal 9,from knowhere then awaits for me to press enter for it to close.the kex app will then show the error code no connection.tried all the tutorials online.but the error code keeps showing.in no root nethunter我該怎麼做才能克服這個持續顯示錯誤的問題。termux向我顯示信號已完成信號9,來自knowhere然後等待我按回車鍵將其關閉。然後kex應用程式將顯示錯誤代碼沒有連接。嘗試了所有線上教學.但是錯誤代碼一直顯示.在沒有 root nethunter 的情況下

Check this video: https://www.youtube.com/watch?v=mjXSh3yq-I0

@NENOcracker
Copy link

Screenshot_20240102_224419_NetHunter KeX.jpg

i followed all steps but still got this error
can any one help ?

@mjcbjee
Copy link

mjcbjee commented Jan 19, 2024

in termux when I type nethunter kex passwd it say command not found. what can I do to solve this problem.

@Rick1330
Copy link

Rick1330 commented Feb 8, 2024

Screenshot_20240209_002721_Termux.jpg

This is how it looks like help me

@sumon-duwarah
Copy link

sumon-duwarah commented Feb 14, 2024

Can't update but i can ping to Google , what's problem here ..? I also tried setting dns to 8.8.8.8 etc but it doesn't fix this issue, I'm on Android 10

I HAD SAME ISSUE and I added the dns to the resolv.conf file ┌──(kali㉿localhost)-[~] └─$ sudo nano /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

No only 3 minute working 🥲🥲

@sumon-duwarah
Copy link

Wow 😍😍😍

@003ry
Copy link

003ry commented Feb 22, 2024

Termux will be killed . This is due to a newly introduced system mechanism called "Phantom Process Killing", which limits daemon usage.The recommendation is to permanently disable "Phantom Process Killing" with the ADB command.The best way is use Windows to download ADB tool from official .
https://developer.android.com/studio/releases/platform-tools
Or use Termux remote debugging ADB.
https://ivonblog.com/posts/termux-wireless-adb/

@Allankioni
Copy link

Allankioni commented Feb 22, 2024 via email

@sheheed777
Copy link

sheheed777 commented Feb 29, 2024

لماذا تظهر لي هذه الرسالة كيف احلها
bash: nethunter: command not found

لقد حملت النسخة الحد الادنى من كالي نيت هنتر

@sheheed777
Copy link

عند كتابة الامر nethunter kex passwd

@jayeshbarman
Copy link

jayeshbarman commented Mar 19, 2024

showing process completed after connecting nethunter kex and it exits

WhatsApp Image 2024-03-19 at 06 05 39_816a44f2

@carlosdarkoficial
Copy link

nh
$ vncserver -localhost no
nh -r

vncserver -localhost no

https://play.google.com/store/apps/details?id=com.realvnc.viewer.android
Screenshot_20240328-050628_Termux
Screenshot_20240328-051056_RVNC Viewer

@Aylin070
Copy link

I'm not even getting the "connect" option in Net hunter kex in my Android phone

@Allankioni
Copy link

Allankioni commented Apr 23, 2024 via email

@VitoGk
Copy link

VitoGk commented May 19, 2024

image

Every time i try to run kex it doesn't run i get a error.

Can somebody help me with it?

I have search the internet but find nothing.

@Vxlmane
Copy link

Vxlmane commented Jun 3, 2024

Nothing is working 😔

Me too ┌──(kali㉿localhost)-[~] └─$ whoami
kali

┌──(kali㉿localhost)-[~]
└─$ ls

┌──(kali㉿localhost)-[~]
└─$ kex
/usr/bin/kex: line 19: vncserver: command not found
/usr/bin/kex: line 20: vncserver: command not found
/usr/bin/kex: line 25: vncpasswd: command not found /usr/bin/kex: line 30: vncserver: command not found

Error starting the KeX server.
Please try "nethunter kex kill" or restart your termux session and try again.

┌──(kali㉿localhost)-[~]
└─$

ME TOO OMG 😭😭😭

@aioont
Copy link

aioont commented Jun 3, 2024

Nothing is working 😔

Me too ┌──(kali㉿localhost)-[~] └─$ whoami
kali

┌──(kali㉿localhost)-[~]
└─$ ls

┌──(kali㉿localhost)-[~]
└─$ kex
/usr/bin/kex: line 19: vncserver: command not found
/usr/bin/kex: line 20: vncserver: command not found
/usr/bin/kex: line 25: vncpasswd: command not found /usr/bin/kex: line 30: vncserver: command not found

Error starting the KeX server.
Please try "nethunter kex kill" or restart your termux session and try again.

┌──(kali㉿localhost)-[~]
└─$

ME TOO OMG 😭😭😭

Follow this

#168 (comment)

And checkout repository

https://github.com/aioont/kex

@carlosdarkoficial
Copy link

Instala e usa o vnc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests