Results 1 to 8 of 8

Thread: SSH connection refused | Kali linux | raspberrypi0w otg

  1. #1
    Join Date
    2019-Sep
    Posts
    6

    SSH connection refused | Kali linux | raspberrypi0w otg

    Recently I've purchased a raspberry pi zero w. I heard that you can set them up to be ssh'ed into just by setting up some config files and plugging in to a usb. However this didn't appear to be as easy as I thought. I ended up running into several problems that were heading banging to troubleshoot. Anyway long story short I now have a rpi0w setup with a installation of kali linux(rpi0w version). When I plug the pi into my laptop. A new connection appears "RNDIS ethernet" saying its and unidentified connection (good all is well). The problem arises when I try to ssh into the pi though putty. I use
    Code:
    ipconfig
    on cmd terminal to get the ip. I use
    Code:
    ping (address)
    to see if I'm getting replies and this works. But when I go putty and put in the same ip I get a error "Connection error:Connection error: Connection refused". When I go into the pi via monitor and keyboard I use
    Code:
    systemctl status ssh
    and it says that ssh is correctly running. I'm not really sure what I'm missing here. If anybody has gone through this process before or has any clue what I should try please reply

  2. #2
    Join Date
    2019-Sep
    Posts
    6
    I went and got some pictures for whoever wants them. Also I went a bit farther and got telnet for cmd. Typed up a command and found that port 22 failed to connect(interesting)

    Capture.jpg

  3. #3
    Join Date
    2016-Dec
    Posts
    806
    I wasn't aware it had a USB to ethernet.

    So, what IP does your computer have and what IP does the PI have?

  4. #4
    Join Date
    2019-Sep
    Posts
    6
    You can see the autoconfigured ip for the raspberry on the image above. I got this IP by inputting ipconfig into the windows command prompt. The pi I've setup to put a static ip on usb0. Not exactly sure if thats working out correctly or not. But since windows is getting a ping back from the pi I'm guessing its a good connection.

    Address information:
    PI-Clientside:
    Windows:Unknown("Like I said no simple way to get it")
    Pi:lo=inet 127.0.0.1
    wlan0=inet 192.168.1.128 (I have an adapter connected through usb hub which connects also to keyboard
    ubs0=inet 192.168.1.129 (Clearly you can see that I've set both wlan0 and usb0 as static ip's)
    Windows-Hostside:
    Pi:169.254.28.139

    Another thing I should mention is that on the pi, I've setup a crontab @reboot event to run this command "sudo ifconfig usb0 up" this event runs about 40-60 seconds after reboot.

  5. #5
    Join Date
    2016-Dec
    Posts
    806
    There is no image.

    Just FYI, ipconfig is a windows tool, and on linux, it's ifconfig.

    On Windows, the IP is 169.x.x.x and I doubt it has any route to 192.168.1.x, so there is your problem. Configure a 192.168.1.x IP address on the windows interface and that will work

  6. #6
    Join Date
    2019-Sep
    Posts
    6
    Okay I ran this command before plugging the pi into my computer and well....

    https://drive.google.com/file/d/1Y2Y...ew?usp=sharing

    **** so theirs no IP. What should I do?

  7. #7
    Join Date
    2016-Dec
    Posts
    806
    Google asks to login. Post it in the forum.

    Set IPs on each side within the same range, that should solve it.

  8. #8
    Join Date
    2019-Sep
    Posts
    6
    How should I go about doing that?

    Edit:Sorry for being a retard about this. I finally got it working

    On the client side I setup usb0 in /etc/network/interface as
    ipv4 = 10.1.1.125
    subnet = 250.0.0.0
    gateway = 10.1.1.1

    On the host I setup static ip with static stuff(etc)

    But turns out I didn't need to. My problem was I was expecting connection from the autoconfiguration but I should have been trying to connect to 10.1.1.125
    Thanks for helping me figure that out

    Right now the pi and the ssh are working correctly
    Last edited by Maskiert; 2019-09-29 at 03:48.

Similar Threads

  1. Replies: 0
    Last Post: 2020-09-16, 02:11
  2. Kali won't update - connection refused.
    By aaronouthier in forum TroubleShooting Archive
    Replies: 4
    Last Post: 2020-07-30, 19:24
  3. Cannot Update Kali - 111: Connection Refused
    By Hamster in forum TroubleShooting Archive
    Replies: 4
    Last Post: 2016-07-22, 11:43
  4. Connection refused to http.kali.org
    By mikevanhoff in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2015-11-24, 07:13

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •