dolson14
Posts: 21
Joined: Sat May 12, 2012 12:20 am
Contact: Website

Re: SSH Guide For Complete noob?

Sat May 12, 2012 7:47 pm

prodata said:


Is Putty the only such compatible ssh client to consider (I"m sure there might be others, but to rephrase: is Putty the accepted standard tool, or does it have competition?)

Is there any such tool that might also have FTP built-in (ie so that a file could easily be transferred between local and remote devices) or is the only answer to use a separate FTP tool.



You might take a look at Bitvise Tunnelier. It's not opensource, but it is free to use in a non-commercial setting.  I find it much more comfortable than PuTTY, and it also provides a gui sftp interface as well.

prodata
Posts: 163
Joined: Tue Jan 24, 2012 5:53 pm
Contact: Website

Re: SSH Guide For Complete noob?

Sat May 12, 2012 8:36 pm

dolson14 wrote: You might take a look at Bitvise Tunnelier.
Thanks - that looks quite neat. And the built-in FTP (or SFTP I guess it is) would be quite useful to take a closer look locally at any larger text files than the shell will easily display.

amacater
Posts: 9
Joined: Sun Apr 15, 2012 7:29 pm

Re: SSH Guide For Complete noob?

Sun May 13, 2012 10:42 am

To find out what the IP address of your Pi is - assuming that it is network connected via Ethernet
and you've got a DHCP server somewhere (often in your cable modem / router) to give it an address:

sudo ifconfig -a

User avatar
Tass
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am

Re: SSH Guide For Complete noob?

Sun May 13, 2012 9:36 pm

prodata wrote:
dolson14 wrote: You might take a look at Bitvise Tunnelier.
Thanks - that looks quite neat. And the built-in FTP (or SFTP I guess it is) would be quite useful to take a closer look locally at any larger text files than the shell will easily display.
2nd that - great tool!!

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: SSH Guide For Complete noob?

Tue May 15, 2012 9:37 am

amacater wrote:To find out what the IP address of your Pi is - assuming that it is network connected via Ethernet
and you've got a DHCP server somewhere (often in your cable modem / router) to give it an address:

sudo ifconfig -a
An easier command is
hostname -I

rohit_v
Posts: 10
Joined: Mon Sep 07, 2015 4:36 pm

Re: SSH Guide For Complete noob?

Mon Sep 07, 2015 4:44 pm

Hello All,

Seems i am pretty late on this but then again late than never.

I am fighting hard to connect my raspberry pi 2 to my dell laptop running windows 7.
I have flashed noobsv1_4_1 on my sdcard plugged to pi 2
I have assigned a dynamic IP 192.168.0.3 to my pi board.
When i do ping on the above IP i get proper response from the boad i.e. like below :-

C:\Users\DELL>ping 192.168.0.3
Pinging 192.168.0.3 with 32 bytes of data:
Reply from 192.168.0.3: bytes=32 time<1ms TTL=64
Reply from 192.168.0.3: bytes=32 time<1ms TTL=64
Reply from 192.168.0.3: bytes=32 time<1ms TTL=64
Reply from 192.168.0.3: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.0.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms


But when i open my putty and try to do an ssh i get connection refused error.

As i understand from the post is SSH is by default not up and running on noobs (am i correct ?)

But how to turn ON ssh on pi 2 via windows PC (no hdmi port) ?

I seemed to have gone through post Tass where he mentioned giving commands in sequence.I tried that too but did not work.

Any comments/support on the above ?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: SSH Guide For Complete noob?

Tue Sep 08, 2015 1:28 am

rohit_v wrote:I have flashed noobsv1_4_1 on my sdcard plugged to pi 2
I have assigned a dynamic IP 192.168.0.3 to my pi board.
When i do ping on the above IP i get proper response from the boad i.e. like below :-
But when i open my putty and try to do an ssh i get connection refused error.
As i understand from the post is SSH is by default not up and running on noobs (am i correct ?)
But how to turn ON ssh on pi 2 via windows PC (no hdmi port) ?
hi rohit_v
your situation is not very clear,
-a-
if you have a good NOOBS SD
but not have done the install of RASPIAN ( by HDMI... )
you can not SSH connect with NOOBS installer.
-b-
if the raspbian is installed already the SSH will work ( because in RASPBIAN SSH is enable default.)
-c-
how you have assigned a dynamic IP
( you mean the router has given that IP for RPI? )
-d-
if you are headless only ( means you want use RPI via ethernet/wifi only )
and not use HDMI/keyboard/mouse, not even for installation,
( besides there is a difficult way of noobs silent install.. )
you should burn RASPBIAN
https://www.raspberrypi.org/downloads/raspbian/
and not copy NOOBS ( different procedure! need install / use Win32DiskImager on win7 PC first )
rohit_v wrote:I am fighting hard to connect my raspberry pi 2 to my dell laptop running windows 7.
the usual situation is that PC and RPI are connected to a router by ethernet cables,
but if you try to connect RPI to laptop by direct ethernet cable
( and later you want share the laptops WIFI internet with the RPI )
its little bit different, so tell us more about your situation!

rohit_v
Posts: 10
Joined: Mon Sep 07, 2015 4:36 pm

Re: SSH Guide For Complete noob?

Tue Sep 08, 2015 11:54 am

Thanks for your feedback.
Please check my reply pointwise

-a-
I am using NOOBS SD and have not installed RASPIAN
So as per you comments i cannot run SSH

-b-
Got It

-c-
I have just given a default IP to my ethernet (random)

-d-
Yes.i do not have any HDMI connectivity to my laptop(my lappy does not have HDMI port :( )
So i have just connected one end of my ethernet cable to RPI and other end to my laptop and trying to do SSH via dynamic IP given above

Things to do at my end--> Firstly,I will flash RASPIAN OS
Secondly as you gave pointers that using SSH directly via ethernet is little bit different.Can you elaborate more on this ?

Thanks for you comments.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: SSH Guide For Complete noob?

Tue Sep 08, 2015 1:07 pm

for a direct ethernet connection, you need following changes:
-a- after you burn the raspbian image with win32diskimager put SD back to cardreader-PC
edit:
cmdline.txt and add in same first line " ip=192.168.1.101::192.168.1.10" with a [space]
with 192.168.1.101 is the IP you want fix for RPI
and 192.168.1.10 the ip you force your laptop ethernet port back
AFTER you enable wifi internet sharing on it.

now SD card in RPI, connect ethernet, power up
login putty SSH [email protected] password raspberry
sudo raspi-config
expand file system and reboot

login again
test if internet ok
ping -c3 8.8.8.8 ( should work )
ping -c3 google.com ( should not work)
now edit
sudo /etc/network/interfaces after eth0 lines add a line
dns-nameservers 8.8.8.8 8.8.4.4
sudo reboot
test if internet ok
ping -c3 8.8.8.8
ping -c3 google.com ( if ok try)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xrdp
start remote desktop connection program on laptop
and login 192.168.1.101
pi
raspberry
and see the RPI desktop in the RDP window

markuswelby
Posts: 19
Joined: Mon Aug 24, 2015 6:06 pm
Location: Pompey, UK

Re: SSH Guide For Complete noob?

Tue Sep 08, 2015 5:45 pm

rohit_v wrote:Things to do at my end--> Firstly,I will flash RASPIAN OS

Once you have got Raspian running on your Pi, the following info may get you past another potential stumbling block that I personally encountered using Putty on windows & you may possibly encounter in due course.

If Putty refuses to connect to your Pi via ssh, I found, I not only had to download puttytel.exe and put it inside the same folder as PUTTY.EXE & other Putty package files, but also had to double-click / run puttytel.exe first then close it before re-opening PUTTY.EXE and connecting to any devices via ssh. Once I've done that, Putty worked fine after that over ssh every-time.

I've had to do this when installing Putty on all the windows PC's i've tried it on over the years, so I'm guessing you will need to do this too.

I'm guessing you downloaded Putty from http://www.chiark.greenend.org.uk/~sgta ... nload.html

puttytel.exe is available there too....

Putty on Ubuntu Desktop has always worked over ssh 'out of the box' for me, so no problems I know of there.

Anyway's, I thought this could be useful if you encounter that problem....

Cheers

markuswelby
Posts: 19
Joined: Mon Aug 24, 2015 6:06 pm
Location: Pompey, UK

Re: SSH Guide For Complete noob?

Tue Sep 08, 2015 6:29 pm

rohit_v wrote:Things to do at my end--> Firstly,I will flash RASPIAN OS


P.S. Assuming you are connecting your Pi to a home router / hub which you have access to the settings of:-


I never bother to set static ip addresses on my Pi or any other devices on a home network.

Every router / hub I've seen in the last ten years or more (no matter what make or model it's been) has the facility to reserve dynamic ip addresses for your devices in it's settings (You may have already done this). It's typically titled DHCP Reservation. Once your Pi is connected to a router / hub and you go into the settings, it should show on the list of connected devices.


I would personally recommend you set a reservation for your Pi in on router /hub, so it only connects to the same ip address every-time.


This saves you having to change any network settings on the Pi & it will always be at the same ip address.

There may be some cases where a static ip has it's advantages or even be necessary, but I have never needed to for connecting over ssh or any other reason so far.

As I said, this assumes you have access to your router settings & you are not unfortunate enough to have a router which does not have this facility.

cheers

rohit_v
Posts: 10
Joined: Mon Sep 07, 2015 4:36 pm

Re: SSH Guide For Complete noob?

Wed Sep 09, 2015 2:48 pm

Hello Guys,

Still i face the same problem i.e. Connection refused.
My command.txt setting is as below
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait " ip=192.168.1.101::192.168.1.10"

My local area connection->IPV4 -> has IP 192.168.1.101

I open my putty and enter 192.168.1.101 on port 22 but still i get the connection refused error.



I attached snapshot of my settings

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: SSH Guide For Complete noob?

Wed Sep 09, 2015 3:06 pm

we talk here only about a windows PC cross wired ethernet cable with RPI
rohit_v wrote:command.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait " ip=192.168.1.101::192.168.1.10"
My local area connection->IPV4 -> has IP 192.168.1.101
I open my putty and enter 192.168.1.101 on port 22 but still i get the connection refused error.
I attached snapshot of my settings
-1- filename is cmdline.txt, and sorry no " should look:
rootwait ip=192.168.1.101::192.168.1.10

-2- PC ipconfig ethernet should be 192.168.1.10 ( set / forced by you )

-3- snapshot? where? make again after correct both settings

rohit_v
Posts: 10
Joined: Mon Sep 07, 2015 4:36 pm

Re: SSH Guide For Complete noob?

Wed Sep 09, 2015 3:22 pm

I got my connection.Thanx a ton !!!!
Could you please tell what should be login id ?
login as :??

rohit_v
Posts: 10
Joined: Mon Sep 07, 2015 4:36 pm

Re: SSH Guide For Complete noob?

Wed Sep 09, 2015 3:24 pm

Got it.Thanx.I am in.
Feels good.

rohit_v
Posts: 10
Joined: Mon Sep 07, 2015 4:36 pm

Re: SSH Guide For Complete noob?

Wed Sep 09, 2015 3:35 pm

Sorry to poke again.
Stuck at below :-

sudo vi /etc/networks/interfaces
test if internet ok
ping -c3 8.8.8.8
ping -c3 google.com ( if ok try) //even after changing interfaces setting it does not work

auto eth0
dns-nameservers 8.8.8.8 8.8.4.4 //added this
allow-hotplug eth0
iface eth0 inet manual


I will try more.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: SSH Guide For Complete noob?

Wed Sep 09, 2015 3:44 pm

ping -c3 8.8.8.8
does it work? ( the laptop should have wifi internet connection! and for that you enabled SHARING?)
the RPI also, just not have the "way" to resolve google.com ( names to IP numbers )
for that is the new line in interfaces.

give me a
ifconfig
cat /etc/resolv.conf

you learn first how to COPY PASTE with PUTTY in both ways!
Last edited by KLL on Wed Sep 09, 2015 3:48 pm, edited 1 time in total.

rohit_v
Posts: 10
Joined: Mon Sep 07, 2015 4:36 pm

Re: SSH Guide For Complete noob?

Wed Sep 09, 2015 3:48 pm

ping -c3 8.8.8.8
Yes this works.
I have enabled my wifi sharing settings as enabled (other network can access internet through this PC)

rohit_v
Posts: 10
Joined: Mon Sep 07, 2015 4:36 pm

Re: SSH Guide For Complete noob?

Wed Sep 09, 2015 3:51 pm

[email protected] ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:41:a7:8d
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:295 errors:0 dropped:0 overruns:0 frame:0
TX packets:934 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21684 (21.1 KiB) TX bytes:133132 (130.0 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:140 errors:0 dropped:0 overruns:0 frame:0
TX packets:140 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11268 (11.0 KiB) TX bytes:11268 (11.0 KiB)

[email protected] ~ $
[email protected] ~ $ cat /etc/resolv.conf
# Generated by resolvconf
[email protected] ~ $ cat /etc/resolv.conf
# Generated by resolvconf
[email protected] ~ $

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: SSH Guide For Complete noob?

Wed Sep 09, 2015 3:57 pm

so the nameservers are not shown in resolv.conf
?? try: change FROM:

Code: Select all

auto eth0
dns-nameservers 8.8.8.8 8.8.4.4
allow-hotplug eth0
iface eth0 inet manual
TO:

Code: Select all

auto eth0
allow-hotplug eth0
iface eth0 inet manual
dns-nameservers 8.8.8.8 8.8.4.4
reboot
and test ping and look resolv.conf again

rohit_v
Posts: 10
Joined: Mon Sep 07, 2015 4:36 pm

Re: SSH Guide For Complete noob?

Thu Sep 10, 2015 1:40 am

Hello kkl

Everything is up and running now.
Thanks a lot for your help.

natodd21
Posts: 2
Joined: Thu Sep 10, 2015 2:48 pm

Re: SSH Guide For Complete noob?

Thu Sep 10, 2015 2:51 pm

I'm attempting to SSH from my Pi to another linux device. When I generate the ssh keys and get them copied over to the other device, I'm still getting a message that the key is denied with "access denied publickey" Where do I need to put the SSH private key on my pi in order for it to work correctly? I'm running Raspbian and have the latest version.

Thanks

Return to “Beginners”