How to remote raspberry pi from putty in Rpi's console mode? - raspberry-pi

Anyone know how to remote to Raspberry Pi 3 console mode from laptop with putty ?
I can remote successfully in Rpi's desktop mode but in console mode I can't.

Assuming you are running Raspbian, SSH is disabled by default, so you must create an empty file named 'ssh' on the SD-card.
You can also
sudo raspberry-config
To enable it through your VNC connection

Related

Can't guess default raspberry password

I've been trying to establish ssh connection with my raspberry by adding config files (wpa_supplicant.conf, ssh) to boot section of sd card with raspberry OS. I've done everything right and usually after these steps I could easily connect to my raspberry.
But, now I can't do this.
Whenever I try to log into raspberry using 'pi' as login and 'raspberry' as password, it says that this is incorrect password. I tried reinstalling OS on sd card; however, it didn't help.
I don't have any other opportunities other than connecting to raspberry wirelessly.
I have Raspberry Pi 4B and Raspberry OS 64-bit
It seems that you are using the latest release of raspbian. Developers have made a huge step forward to the security and there is no more default user pi and password raspberry, no need of the wpa_supplicant.conf & ssh files (but they are still work).
For headless setup you can press settings button in the last version of Raspberry Pi Imager and configure User, Wi-Fi, SSH and so on.
Scroll down to the Headless setup chapter
https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/
I created a guide with images to do this here:
As per the official raspberry blog at https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022 the default username password will no longer be allowed for headless login.
Basically there are two methods
Use the updated raspberry pi imager too from here
manually add userconf file in the boot directory with username:encrypted-password as a single line. to generate encrypted-password string use echo 'mypassword' | openssl passwd -6 -stdin tested on win 10

Raspberry Pi VNC fail connection

I face a problem that I can ping to correct IP address, it have no loss. And also I use nmap ping the pi address, and I get it correctly. Then I using VNC viewer to try access to pi, but it always show up "The connection was refused by the host computer"
Did u all have any idea ?
Your problem indicates that your Raspberry Pi was reached by the connection attempt, but that no service was running on the relevant port and hence the connection was refused. I think, this is because the VNC service is not running on your Raspberry Pi.
Update 1
Raspbian now comes with the server by default thanks to a partnership with RealVNC, it just needs to be enabled.
Original
You must enable VNC Server on your Raspberry Pi using terminal
sudo apt-get update
sudo apt-get install realvnc-vnc-server
or you can also enable VNC Server on the command line using the sudo raspi-config command.
Advanced Options->VNC:Yes
Now you can connect to the VNC Server using a application such as VNC Viewer.
I have been having this issue with my Raspberry Pi Zero W even though it worked perfectly beforehand. This page https://www.realvnc.com/en/connect/docs/raspberry-pi.html should help.
I ran vncserver in a ssh window after verifying the interface settings in raspi-config.
It started the VNC Server and gave me the VNC Server catchphrase and the IP address with Port Number as shown in the photo linked below.
vncserver output
After running that command I was able to get the VNC Viewer on my windows machine to connect to the pi.
I then ran sudo systemctl enable vncserver-x11-serviced.service in the ssh window so that it would start automatically on subsequent reboots.
I've had this same problem but found a different reason. I found three ways to get around this error message.
Plug a mouse or keyboard into the Raspberry Pi zero, waking up the screen and the VNC connection.
Wait about 5 - 10 minutes which is the amount of time for the screen saver to kick in which seems to wake up VNC connection. but don't wait to long other wise run this command to get things going via ssh "systemctl start vncserver-x11-serviced.service".
I am hoping the new update they just published will fix this problem. I don't see this as much with the Raspi B3+ as with the Zero H.
The last was plug in both monitor and mouse and that for sure fixes the VNC issues but defeats the headless connection. It seems that running headless and the screen/saver are somehow related but just not smart enough to figure it out.
For people using newer version of Raspberry, VNC option is found under:
Config>Interface Options
pinging to any service will only tells us that whether the server is currently listening on that port or not. It will not tell you the possible result to connection request asked by client.
It seems that, you have installed VNC server but not started it properly. Use this command to start it...
# vncserver start
Also recheck the port number is correct or not.
With the Rasp Pi 4 - had connecting fail after rebooting both the server and client (both Rasp Pi 4s).
Took a while to realize that I have two clients: One named "VNC Client", the other "VNC Viewer for Google Chrome".
The former works, the latter doesn't.

How can I get connection with Raspberry without access of its shell?

There are Raspberry Pi 3 model B and MicroSD with NOOBS OS. Unfortunately I have not any display to get a direct access to NOOBS shell. So remote connection could be set via ssh. However my device does not have any IP-address. I read everywhere that the connection options must be set... via shell. But it's impossible for me!
How can I resolve this problem and get remote access to shell (or to desktop even)?
I ran into this a while ago, I started using PiBakery. It will write raspbian to the SD card and add a startup script to connect to the network and enable ssh. This way the first time you boot it up, its ready to go and you can connect via SSH.
When you set it up, it also allows you to set a static IP address so you know exactly where it is when it boots.
Enable SSH by placing a file named 'ssh', without any extension, onto the boot partition of the SD card.
Connect your device to your LAN using a wired connection.
From another computer on the network execute arp -a to view locally connected hosts and get your raspberry pi's IP address.
From there you should be able to SSH into your pi.

Hyper-V Enhanced Session Mode Does Not Work

I am new to virtual machines so pardon my ignorance.
I have a host machine running Windows Server 2012 R2 and I'm trying to run a VM with Windows 8.1 Enterprise using Hyper-V. I need to be able to use USB devices on the VM.
Please check screenshot for the Hyper-V settings and the VM settings. The VMConnect does not have 'Show Options' to select local resources.
I tried using Remote Desktop Connection to the VM but nothing happens when USB devices are plugged in the host machine.
Not sure what I'm missing here.
Any help in fixing this will be greatly appreciated. Thanks!
Hyper-V Settings
VM Settings
If the USB device you want to use in the VM is a USB memory stick share it with the RDP local resources option as a Drive instead of the trying to replicate the USB port itself.
Eg:
There is a dependency(XRDP) to be installed in order to enable Enhanced Session Mode. Please follow the following steps or watch this video for more clarity.
Visit https://www.youtube.com/watch?v=LS2m6iyG7_M&ab_channel=VikeshYadav
On hyper-v linux machine:
git clone https://github.com/Microsoft/linux-vm-tools
cd linux-vm-tools/ubuntu/18.04/
sudo chmod +x install.sh
sudo ./install.sh
On windows machine:
set-vm -VMName ubuntu -EnhancedSessionTransportType HvSocket
I've got Win8.1 guest system (1 gen VM) and Win10 as host. Tried pretty much everything, but wasn't able to enable Enhanced Mode (simply grayed out all the time), unless I enabled RDP connections in the guest system (Control Panel, Allow remote access to your computer). After this change VMConnect with ability to share local resources appeared on attempt to connect to the VM.
Hope this helps all the people who find this thread while googling.

Remote Development with NSight 6.5 with "indirect" ssh

Suppose I can log in to a gpu sever named gpu1.sp.sw, and there are gpu2.sp.sw and gpu3.sp.sw to which I cannot log in directly but can be reached by ssh gpu-2, ssh gpu-3, after I am already on gpu1.sp.sw.
My question is: If I want NSight 6.5 to run and debug remotely on gpu-2 or gpu-3, how can I do it?
As workaround you can use ssh tunnels: run something like
ssh gpu1.sp.sw -L2202:gpu2.sp.sw:22 -L2345:gpu2.sp.sw:2345 -nNT
in background console. Then configure NSight remote debugging to connect to server localhost, ssh port 2202 and cuda-gdbserver port 2345.