timvansteenbergen
Posts: 4
Joined: Sun Jul 29, 2018 11:36 am

ssh connection without password

Sun Jul 29, 2018 11:52 am

Hi forum, I want a ssh connection from my windows-pc to my pi without having to enter my password. I followed https://www.raspberrypi.org/documentati ... ordless.md, but without good result. Here is what I did, hoping for you to spot where I go wrong:
- on my pc from commandline "ssh-keygen". Gave no passphrase; this resulted in the keypair on my windows-pc
- copied the <mykeypair>.pub to my pi's home-directory of user pi: ~/.ssh/; did this using scp entering the password
- in .ssh: "cat <mykeypair>.pub >> ~/.ssh/authorized_keys" ; worked fine and cat authorized_keys showed me that the new key is there
Still on my windows-pc from (restarted) commandline-box "ssh [email protected]" requests me to enter the password.,

Ernst
Posts: 1254
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: ssh connection without password

Sun Jul 29, 2018 2:40 pm

timvansteenbergen wrote:
Sun Jul 29, 2018 11:52 am
Still on my windows-pc from (restarted) commandline-box "ssh [email protected]" requests me to enter the password.,
I suggest you use PuTTY.

https://www.howtogeek.com/336775/how-to ... -commands/
The road to insanity is paved with static ip addresses

User avatar
The Traveler
Posts: 363
Joined: Sat Oct 21, 2017 3:48 pm

Re: ssh connection without password

Sun Jul 29, 2018 2:42 pm

Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

timvansteenbergen
Posts: 4
Joined: Sun Jul 29, 2018 11:36 am

Re: ssh connection without password

Sun Jul 29, 2018 7:45 pm

Ernst wrote:
Sun Jul 29, 2018 2:40 pm
timvansteenbergen wrote:
Sun Jul 29, 2018 11:52 am
Still on my windows-pc from (restarted) commandline-box "ssh [email protected]" requests me to enter the password.,
I suggest you use PuTTY.

https://www.howtogeek.com/336775/how-to ... -commands/
Hi Ernst,

My goal is to transfer files from pi to pc without logging in. Tried to figure out how to do this with Putty,. but failed at the point where cPanel is mentioned. I don't have that on my pc. Tried the same with puttygen and pageant but still password is requested.
So how can I connect to my pi and trasfer files without entering a password using Putty?

Thanks in advance,
Tim

timvansteenbergen
Posts: 4
Joined: Sun Jul 29, 2018 11:36 am

Re: ssh connection without password

Sun Jul 29, 2018 9:04 pm

The Traveler wrote:
Sun Jul 29, 2018 2:42 pm
or smarTTY: http://smartty.sysprogs.com/
Hi Traveler,
Thanks for the tip. I have installed SmarTTY and did succeed to get it to log on without using a password. But my goal seems unreachable with this tool, since I can't seem to initiate a filetransfer from commandline.
Looks just not one of the functions of SmarTTY, or am I overlooking some option?
Regards,
Tim

User avatar
TideMan
Posts: 236
Joined: Fri Jun 22, 2012 8:08 am
Location: ChCh, NZ

Re: ssh connection without password

Sun Jul 29, 2018 11:49 pm

I use WinSCP for copying files to/from PC to RPi.
You can use a script and run it on a schedule.
Here is a typical script in a file called sync.txt:

Code: Select all

open pi:[email protected]
cd /home/pi/Rain/RiccartonHagley
synchronize remote
close
exit
which you can execute from DOS using:

Code: Select all

"c:\Program Files (x86)\WinSCP\WinSCP.com" /script=sync.txt

Ernst
Posts: 1254
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: ssh connection without password

Mon Jul 30, 2018 6:17 am

timvansteenbergen wrote:
Sun Jul 29, 2018 9:04 pm
The Traveler wrote:
Sun Jul 29, 2018 2:42 pm
or smarTTY: http://smartty.sysprogs.com/
I have installed SmarTTY and did succeed to get it to log on without using a password. But my goal seems unreachable with this tool, since I can't seem to initiate a filetransfer from commandline.
Looks just not one of the functions of SmarTTY, or am I overlooking some option?
Use PuTTY which includeds putty for ssh and pscp for file transfer.
https://www.chiark.greenend.org.uk/~sgt ... atest.html
The road to insanity is paved with static ip addresses

timvansteenbergen
Posts: 4
Joined: Sun Jul 29, 2018 11:36 am

Re: ssh connection without password

Tue Jul 31, 2018 7:29 pm

Finally the winner out of putty, smartty and winscp has becone winscp. WinSCP and it's script worked the best so far, retrieving the files from the pi nicely. Would love to install putty correctly on my pi and be able to push the files, but that will be a later story. Got this sorted good enough for my purposes.
Thanks all for your tips, I appreciate all of them.

Ernst
Posts: 1254
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: ssh connection without password

Tue Jul 31, 2018 8:57 pm

timvansteenbergen wrote:
Sun Jul 29, 2018 7:45 pm
Ernst wrote:
Sun Jul 29, 2018 2:40 pm
timvansteenbergen wrote:
Sun Jul 29, 2018 11:52 am
Still on my windows-pc from (restarted) commandline-box "ssh [email protected]" requests me to enter the password.,
I suggest you use PuTTY.

https://www.howtogeek.com/336775/how-to ... -commands/
Hi Ernst,

My goal is to transfer files from pi to pc without logging in. Tried to figure out how to do this with Putty,. but failed at the point where cPanel is mentioned. I don't have that on my pc. Tried the same with puttygen and pageant but still password is requested.
So how can I connect to my pi and trasfer files without entering a password using Putty?

Thanks in advance,
Tim
You seem to be very confused:
Hi forum, I want a ssh connection from my windows-pc to my pi without having to enter my password
and
till on my windows-pc from (restarted) commandline-box "ssh [email protected]" requests me to enter the password.,
Which indicates that you are trying to use the non-functional Windows 10 ssh command to connect to the Pi using keys, to which I replied that you need PuTTY.

Now you have found nirvana with WinSCP using a script and you are still looking for a way to push files from the Pi to the PC. What has that got to do with your initial subject ?????

I will let you in on a secret: you do not need WinSCP, you do not need ssh, you do not need PuTTY, you do not need FTP, ...
all you need is SMB and now it is up to you find the solution.

Describing the problem is often the most difficult part of the problem, you could have done better.
The road to insanity is paved with static ip addresses

Return to “Troubleshooting”