vividvibe1
Posts: 1
Joined: Thu Jul 14, 2016 2:59 am

Accessing Pi from Windows

Thu Jul 14, 2016 3:34 am

I am trying to access my Raspberry Pi 2 running Raspbian using my Windows 10 desktop. I have installed a program called TightVNC viewer, I have also installed Putty and have limited knowledge of how to use it. On the Pi, I have SSH enabled and I have found its IP address. Putty fails after saying "access denied" when I enter the password. TightVNC says that "the target machine has actively refused" the connection. I found some information online and tried these command from the Pi's terminal:

Code: Select all

sudo bash
cd /boot
mv boot_enable_ssh.rc boot.rc
shutdown -r -time now
It fails on step 3 saying, "mv: cannot stat 'boot_enable_ssh.rc': No such file or directory."

I think these commands are supposed to enable SSH, even though I have it enabled in the Pi's settings menu. Is there anything I am missing or perhaps someone else has had a similar incident and found a solution? I would appreciate any advice or tips. I didn't provide screenshots but I will if necessary. Thank you in advance.

Edit: Thank you for all the helpful suggestions and potential solutions. I was able to solve the problem. I used Remmina in my Linux OS, with absolutely no snags whatsoever. I used mRemoteNG on Windows 10 and it too works like a charm. No errors to report. Again, thanks to everyone who contributed to my post.
Last edited by vividvibe1 on Thu Jul 14, 2016 7:55 pm, edited 1 time in total.

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Accessing Pi from Windows

Thu Jul 14, 2016 6:07 am

VNC and SSH are two completely different animals; the first (virtual network computing) allows you to control the PI from your PC using tightvnc viewer. The second allows you to control your PI from your Windows desktop using putty (an SSH, secure shell, client for windows). Not to confuse you, VNC will run 'over' ssh to give vnc security (encryption), but, ssh is not 'needed' to run vnc...

... to run vnc you need to install tightvncserver on your PI:

Code: Select all

sudo apt-get install tightvncserver
Then you run the command (just once):

Code: Select all

tightvncserver
It will prompt you for your passwords that you will be using later... and it will start the server. Kill the first server run with :

Code: Select all

vncserver -kill :1
Now start the server with this command (or something similar):

Code: Select all

vncserver :1 -depth 24 -geometry 1376x768 &
by default it will listen on port 5900... the port you will use to attach is 5901... the sum of the listening port number and the display :1 number.

On your Windows PC (in tightvnc viewer) you will attach to your PI with:

Code: Select all

vncviewer <hostname>:5901
Windows vncviewer may be configured (as a gui) to only allow you to configure the hostname (or IP address of your PI on your network) and the port number, which in this case will be 5901.

It may also allow you to configure your password... use the one you entered when you setup your server.

Then connect.

Start there. Once you get that running you can try to configure an ssh tunnel to run VNC over, to secure things... but... be aware that running vnc over ssh (while more secure) is also slower... the latency is sometimes even unacceptable.

best to you

marcus
marcus
:ugeek:

NicoVanDerDussen
Posts: 74
Joined: Sat Aug 24, 2013 2:41 pm

Re: Accessing Pi from Windows

Thu Jul 14, 2016 6:27 am

I'm using Remote Desktop on my Win 10 machine

To enable the server part on your Raspi,

To install:

Code: Select all

sudo apt-get install xrdp
I find this the easiest way to get things going :)
Setting up your Raspberry Pi to work with a 3G dongle http://nvdd.info/11gKrsZ

User avatar
hansotten
Posts: 324
Joined: Fri Jul 13, 2012 6:01 am
Contact: Website

Re: Accessing Pi from Windows

Thu Jul 14, 2016 6:28 am

Accessing a Pi from Windows 10 is easy.

Make sure the Pi is reachable.
Do a ping on a Windows command line to your Pi's IP address (and you get that with ifconfig command on the Pi)

If you have installed Bonjour on Windows you can use raspberrypi.local (or whatever name you agve your Pi with Raspi-config) as address instead of the IP address.

SSH works 'out of the box' if not disabled in raspi-config. Use PuTTY on Windows.

Install XRDP (sudo apt-get xrdp on the Pi) and use Remote Desktop Connection on the W10 machine. No further configuration required.

See http://duinorasp.hansotten.com/raspberry-remote-access/ how I do this in detail.
http://duinorasp.hansotten.com for Raspberry Pi and Arduino and ESP8266
http://retro.hansotten.nl for retrocomputing with the 6502 cpu

User avatar
B.Goode
Posts: 8889
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Accessing Pi from Windows

Thu Jul 14, 2016 8:56 am

vividvibe1 wrote:I am trying to access my Raspberry Pi 2 running Raspbian using my Windows 10 desktop. I have installed a program called TightVNC viewer, I have also installed Putty and have limited knowledge of how to use it. On the Pi, I have SSH enabled and I have found its IP address. Putty fails after saying "access denied" when I enter the password.
"On the Pi, I have SSH enabled and I have found its IP address. Putty fails after saying "access denied" when I enter the password."

Either you have mis-identified the IP address of the RPi (so you are trying to log in to some other system), or you have mis-remembered or mis-typed the password.

Return to “Beginners”