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

See How can you recover your password? which explains how to reset the password. HOWEVER if someone has modified the password there is no way of knowing what else was done. Either restore from your backup OR do a fresh install - you should have given up on Jessie a year ago - it is unsupported! The VERY FIRST thing I do on ANY installation is change the ...


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 ...


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

Connect your pi to your network with the Ethernet cable and power up. Next, find the Pis IP address Then connect with a terminal:ssh pi@ADDRESS It will ask you about the new ECDSA key, accept and you should be good! There's a nice walk-though at MagPI magazine


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

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 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 ...


2

To enable video output while using VNC you will need to do the following on older versions of VNC server on the Rasperry Pi. Open VNC Server>Options>Troubleshooting. Then make sure "enable experimental direct capture mode is checked. You should now be able to view videos over vnc. You may also want to consider doing the following but it is not necessary. ...


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

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

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 ...


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

I know this is an old question but the solution is even older. Male to Male USB bridge networking cables. See the article(from 2005) for a better explanation. Amazon has plenty of similar, if not the same, cables available at the time of this writing(12/2018). While it's not the exact solution to the question I thought I'd add this so future users can be ...


2

From the MAC start a ssh session. I assume sudo on the RasPi is not asking for a password. ssh pi@xxxx sudo tar -czf - -V "Backup of the home folder from myuser" -C /home/myuser/ ./ | dd of=~/Desktop/myuser_backup.tar.gz bs=1M The options for tar mean: -c create a tar archive, z create a gziped archive. f is the archive name, here with - it is send to ...


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

You can connect a computer via a direct Ethernet connection and ssh using a Link-local address with ssh pi@raspberrypi.local (assuming user Pi and unchanged hostname). This connection has some restrictions, but ssh works. One drawback is that with no internet connection there will be no time/date setup. It would be better to connect the Pi to your router; ...


2

I've had an issue with similar symptoms. The dhcp server assigns an IP address to the 'new' (second) pi but the original lease is still on on the sd card and not changed. There's an answer here: How to make dhclient forget its last DHCP lease? The suggestion is to clear the lease on the pi: sudo dhclient -r -v eth0 && rm /var/lib/dhcp/dhclient.* ; ...


2

This seems weird to me. It's for the same reason you cannot connect the USB ports on your laptop to your desktop and use SSH over that. USB is not a symmetrical protocol, meaning the two parties in a relationship are not equals. One is the master, and one is the slave. This is controlled in hardware, and although I believe it would be pretty simple to ...


2

I don't know if you've changed some settings on your Pi or not, but recent "stock" Raspbian will have the Avahi service installed & configured for the SSH server. All being well you should be able to say ssh pi@raspberrypi.local from within the local network, where raspberrypi is the hostname you've given your Pi, and connect. If it's not set up on your ...


2

in the terminal : sudo raspi-config then with 'N1 hostname' give the name you want to your pi : mypi reboot then you can connect in ssh with : ssh pi@mypi.local


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