4

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

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 pi@192.168.0.12

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.

| improve this answer | |
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 pi@192.168.0.12.

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 pi@192.168.0.12 -p 5500

| improve this answer | |
-1

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

ssh pi@192.168.0.12
| improve this answer | |
  • Why has this been downvoted? – Bhav Jul 30 '15 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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