Hot answers tagged

9

HOW TO REPLACE SSH HOST KEYS ON RASPBIAN W/O BOOTING INTO IT Note: I had this happen with a recent download and install of Raspian full... it occurred on a headless pi zero W and a headless pi 3B+. This solved it in both cases. Not sure what was wrong with the keys but I suspect something may have been broken in the distribution. If your ssh "connection ...


7

I figured it out. Screen Configuration tool is just a GUI for XRandR. We can use, DISPLAY=:0 xrandr --output $monitorName --rotate $orientation Where $monitorName is the display name from the output of DISPLAY=:0 xrandr. $orientation is left, right, inverted, or normal.


6

If you can ping an IP address (like 8.8.8.8) but not a URL, you have a problem with accessing a DNS server to look up names. It's really hard to understand how your system is connected with the details you have provided but I'm hoping this helps you look in the right place. (Sorry to use "Answer" but I don't have enough rep to "Comment")


4

I have never heard that ssh depends on date and time. I have just tested it by setting: rpi ~$ sudo date --set='2000-01-01' Sat 1 Jan 00:00:00 GMT 2000 rpi ~$ I have no problem to ssh into the RasPi. You should start ssh with the verbose option -v: remote ~$ ssh -v pi@raspberrypi This should show you more details why ssh reset the connection. On the ...


4

NOOBS itself is not an operating system just an installer which can install an operating system like Raspbian. As far as I know, NOOBS is not design to work headless. If you really want a headless setup just flash Raspbian Lite on the SD card and place the file inside the boot partition. A good tool for flashing images to SD card is Etcher For more ...


4

It's simple. After you write an .img file to the SD-Card, you can find a boot partition. You just need to add an empty file that is named ssh without any format extensions in this partition. After that, plug the SD-Card into the raspberry pi and turn it on. With the DHCP server of your Access point or something like that, you can find the IP address of the ...


4

Based on your answer that there wasn't a boot partition, your report that the display doesn't work, and an experiment that I've just conducted, I suspect that UNetbootin doesn't do a proper job of installing Raspbian. Since you're just getting started, please try this: Get a copy of balenaEtcher and use it to re-flash your microSD card. Try the boot ...


3

There is an inherent problem with your live backup approach: you need the entire file system to remain stable during the backup process, otherwise there is no way to guarantee that the backup will correctly work afterwards. One solution is to remount your filesystem read-only during the backup process (pretty much impossible for / on a running system, ...


3

I had the same issue, I just renamed my SSH file to ssh (all small). and yes you've to do this before your first boot


3

For users with macOS Sierra (and I think newer): First, you need to have an RNDIS/Ethernet Gadget interface in the Mac's Network Preferences. This is available as standard on Sierra. However, it might not appear automatically in the Network Preferences, and you may have to add it, using the + icon. The list of available interfaces to add will not include ...


3

After posting this I just found a forum with a related problem. Since I generated the keypair on linux, you must do: ssh-keygen -b [NUMBER OF BITS] -C [COMMENT] -f [FILENAME] -P "". The important bit is the -P "", as it seems to ensure ssh does not require the user to enter a password when the key file is used.


3

You certainly can, using SSH keys (with or without keyphrases). Use ssh-keygen to create a pair of keys (public and private), then put the public into the server's (RPi's) ~/.ssh/authorized_keys2 file (I think you can omit the 2 nowdays). If you put your private into your client's .ssh/ directory, your client uses it by default, but ssh's -I option accepts ...


3

Create a UDP "server" socket on the Pi, and use a client on the laptop to send commands to it. Just send more packages to be sure to get it. UDP won't need you to connect, and it has good latency. Or you can use TCP as well, it's not that different on the Python side. Since you probably wrote your image recognition program in Python (and added a Python tag),...


3

You can't connect form one device to another through the iPhone hotspot : https://apple.stackexchange.com/questions/194842/iphone-is-the-hotspot-isolated-can-you-see-other-devices So you might be out of luck with this setup.


3

You cannot revive the ssh session once disconnected. Sometimes if the network drops for a short enough time the session never disconnects, but once disconnected it is gone. That's a security feature. You can, however, keep your terminal session active between ssh sessions. Check out the Linux programs screen or tmux.


3

How very foolish of me. Being a bit used to stretch lite, I didn't delve into the full Raspbian GUI. When I did, sure enough, going to preferences/Raspi configure/interfaces, there it was, by default - ssh disabled. Selected ssh enabled, pressed ok, job done.


3

To troubleshoot your problem run systemctl status ssh. You can see from the output if the ssh server is running and enabled and also see the most recent lines from the log. journalctl -e -u ssh.service could also be helpful to find the issue. It will show everything logged regarding the specified unit. As we clarified in the comments you found following ...


3

You can use the screen (or tmux, but I'm not familiar with it) terminal multiplexer. First install it with sudo apt install screen. Then just start it with screen. You will get a normal terminal with a command line. You can start programs there as usual but you are able to detach from the screen terminal with Ctrla+d. This will leave the screen terminal but ...


3

I solved it by switching off my VPN and using a different USB cable; either one of these could have fixed it. I hope this solves any issues others may have.


3

After you have imaged the card before you put it in your Raspberry Pi if you mount the filesystem you can create a file in the /boot folder named ssh and that will enable the SSH service upon first boot.


3

You could always just plug the pi into the USB-C port and SSH in that way. The USB-C can be used to turn the Pi4 into an ethernet device, I've written up instructions on how to set it up here: https://www.hardill.me.uk/wordpress/2019/11/02/pi4-usb-c-gadget/


2

Accessing your RaspberryPi ( or even laptops/servers) from outside your home network (meaning, from the internet) is not an easy task, because your home laptop or RaspberryPi has only local IP address ( in the 10.x.x.x range or 192.168.x.x range). It doesn't have a Public IP address that is visible from the Internet. The simple answer to your question is ...


2

systemctl solution If you already have a shell on the Pi through a non-SSH method such as screen + keyboard or UART (see this post), you can also just run: sudo systemctl enable ssh sudo service sshd start instead of doing it interactively through sudo raspi-config. /boot/ssh magic file If you don't have a shell on the Pi yet, insert he SD card on your ...


2

If you want to display X11 apps on your Mac desktop, you don't run startx from the pi - that will attempt to start it on the pi's screen. Instead, run an X11 server on your Mac, configured to allow remote connections. Then, on the Pi, set your DISPLAY environment variable to point to the Mac's server. In my case (macOS Sierra 10.12.6), I downloaded and ...


2

This isn't specifically a Raspberry Pi thing... Critically, you should make sure that whatever you do, you don't rely on passwords alone. Either switch to certificate-based authentication methods -or- multi-factor authentication. I've configured both VPN (OpenVPN) and ssh access to my network or to specific servers, but use certificates. On ssh, run ...


2

Simple way to disable it is to simply read the instructions and change to userid=pi password from "raspberry" to any other string".


2

In order to forward X display to your machine you need following: enable X forwarding on sshd on RPi (/etc/ssh/sshd_config: X11Forwarding yes) configure ssh client on your machine to enable X forwarding and point it to X server (for example 127.0.0.1:0) install Xserver on your machine (for example Xming) and run it log in via ssh to RPi start X application ...


2

Well, 2 years late, but I've find out that the problem was just the wi-fi connection. It was not only very slow, but it also lost an appreciable amount of packets (from 20% to 30%), so it was enough to use the ethernet connection instead.


2

Your question is a bit thin on details. I note in your response to @ppumpkin that you can connect IPv6-to-IPv6 perfectly. You say the shape of your problem is connecting from IPv4 to IPv6. If your Pi is setup on a world-routable Global Unicast Address then it SHOULD be contactable from outside your LAN assuming the IPv6 FW rules allow a hole for the ...


2

You just need to add two files to your boot partition: One called wpa_supplicant.conf which contains something like: country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="your_real_wifi_ssid" psk="your_real_password" key_mgmt=WPA-PSK } and one called ssh to enable the ssh service. It's not that ...


Only top voted, non community-wiki answers of a minimum length are eligible