2

I'm trying to set up my Raspberry Pi as a VPN using this guide here however, I can't connect via ssh from my Mac Terminal to my Pi for some reason.

Running the

ifconfig

command, my Pi's IP address is 192.168.0.12 and I've reset my password successfully using the

passwd pi

command so I know my password.

However, when in my Mac Terminal, I enter the following command

ssh 192.168.0.12

and then it ask's for a password. If I enter the newly set password, I receive the following message

Permission denied, please try again.

Any ideas why and how I could resolve this?

4 Answers 4

5

As has been stated elsewhere on this page, if you're ssh'ing in and don't have SSH keys set up, then you need to specify your username on the server (Pi) you're logging into, like so:

ssh [email protected]

then enter your password.

If you'd like to ssh in without having to specify a username or password in the future, checkout this tutorial: Passwordless SSH access. Note that you'll also need to have username on the Raspberry Pi that matches the username you're using on your local machine, to log in via this method.

2

When you type ssh 192.168.0.12 you are ssh'ing to the Pi with your current user account as the user id. So whatever your mac user is (you can use the command whoami at the terminal command prompt if you are curious), that is the user you are attempting to connect with. My guess is that your pi doesn't know that user.

If you want to specify the user with ssh you use the form ssh user@address, so in your case that would be ssh [email protected].

If you are ever trying to ssh through a different port (e.g. port mapping through your firewall), then you would add -p port. E.g. ssh [email protected] -p 5500

0

Keyboard layout on the raspberry was set to uk which makes shift + 2 = " instead of @sign. After changing the layout to US from raspi-config it worked.

-1

The command I entered was attempting to log in as the Mac user.

ssh [email protected]
1
  • Why has this been downvoted?
    – Bhav
    Jul 30, 2015 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.