Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

norcal707

macrumors newbie
Original poster
Jan 30, 2013
5
0
Super new to this whole ssh thing ive just recently been looking into it and its really interesting.

I was trying to just learn how to actually give another computer commands and have already encountered a problem.
using guides found online i have open a terminal and made sure both computers had remote login checked, port 22 is open but we are on a huge network, a university wifi that thousands of students use.
when prompted for the password i type it in and it has me repeat that three times before finally giving me permission denied (publickey, keyboard-interactive)

ex. ssh username@####
Password:
Password:
Password:
Permission denied

I was wondering because the server houses so many people it is timing out before it can find the ip?
let me know if this is in the wrong section I am just brand new to this and would really like to learn more about it, any links to guides would be greatly appreciated.
 

Intell

macrumors P6
Jan 24, 2010
18,955
509
Inside
You're getting that error because you're either putting in the wrong password or that user doesn't exist on the server or the user doesn't have remote access allowed on their account.
 

estorstenson

macrumors member
Jan 30, 2013
38
3
I would say you were mistyping the password. If it's your university's server, I doubt the login is timing out. If you are trying to log into your own machine, maybe you were actually hitting a different machine by mistake?

Also, keep in mind that the account on your mac is what is used by default. So, if your user account is JohnDoe on your mac, and it's actually jdoe123 on the server, just typing: ssh servername isn't good enough. You'll need to specify the username you are trying to log into: ssh jdoe123@servername
 

norcal707

macrumors newbie
Original poster
Jan 30, 2013
5
0
I would say you were mistyping the password. If it's your university's server, I doubt the login is timing out. If you are trying to log into your own machine, maybe you were actually hitting a different machine by mistake?

Also, keep in mind that the account on your mac is what is used by default. So, if your user account is JohnDoe on your mac, and it's actually jdoe123 on the server, just typing: ssh servername isn't good enough. You'll need to specify the username you are trying to log into: ssh jdoe123@servername

I have made sure the remote login and management are checked for both computers, and that the correct servername and ip is there. now it gives me
port 22: operation timeout
as long as the correct servername and ip is found when you enable the remote login? it gives you a specific set that you enter into a terminal "ssh user@###"
 

LPZ

macrumors 65816
Jul 11, 2006
1,221
2
I have made sure the remote login and management are checked for both computers, and that the correct servername and ip is there. now it gives me
port 22: operation timeout
as long as the correct servername and ip is found when you enable the remote login? it gives you a specific set that you enter into a terminal "ssh user@###"

First, you don't need Remote Login enabled on the computer from which you are issuing the ssh command. Remote Login needs to be enabled only on the machine you wish to reach. Please disable Remote Login on the machine from which you are issuing the ssh command, unless you also wish to login to that machine from somewhere else. No sense providing a potential security vulnerability.

To get more information, you could invoke ssh in verbose mode. In Terminal, enter

Code:
ssh -vvv username@ip_address

What output do you get?
 

norcal707

macrumors newbie
Original poster
Jan 30, 2013
5
0
First, you don't need Remote Login enabled on the computer from which you are issuing the ssh command. Remote Login needs to be enabled only on the machine you wish to reach. Please disable Remote Login on the machine from which you are issuing the ssh command, unless you also wish to login to that machine from somewhere else. No sense providing a potential security vulnerability.

To get more information, you could invoke ssh in verbose mode. In Terminal, enter

Code:
ssh -vvv username@ip_address

What output do you get?

it reads out, port 22: operation timeout

port 22 is open on both computers, i've read online that after a number of failed login attempts it wont allow my ip to connect anymore? Not sure if this is true I have yet to have a successful connection, is there any sort of guide i should be reading for introductory level computer skills/hacking im not sure what it would be called. any help appreciated even if its just interesting things i could do on a computer! thank you!
 

LPZ

macrumors 65816
Jul 11, 2006
1,221
2
it reads out, port 22: operation timeout

That's not very verbose. :) Are you sure you typed the -vvv?

What happens if you enter the following in Terminal on the machine where you are typing ssh?

Code:
traceroute -m 10 ip_address_you_want_to_reach

And there's no reason to have port 22 open on the machine you are trying to connect from.
 

norcal707

macrumors newbie
Original poster
Jan 30, 2013
5
0
That's not very verbose. :) Are you sure you typed the -vvv?

What happens if you enter the following in Terminal on the machine where you are typing ssh?

Code:
traceroute -m 10 ip_address_you_want_to_reach

And there's no reason to have port 22 open on the machine you are trying to connect from.

Code:
10 hops max, 52 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *

thats what i got for the first traceroute i tried and so i went back and took another look at the other computer and it seems the ip for the ssh has changed, so after inputting that new ip onto the traceroute its giving me errors of the host being down

ex
Code:
  8  * *traceroute: sendto: No route to host
traceroute: wrote ##### 52 chars, ret=-1
 *
traceroute: sendto: Host is down
 9 traceroute: wrote #### 52 chars, ret=-1
 *traceroute: sendto: Host is down
traceroute: wrote #### 52 chars, ret=-1
 *traceroute: sendto: Host is down
traceroute: wrote ###### 52 chars, ret=-1
 *
10  * * *
 
Last edited:

LPZ

macrumors 65816
Jul 11, 2006
1,221
2
Code:
10 hops max, 52 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *

???

OK, let's see if your machine can contact something else.

Code:
traceroute -m 10 74.125.226.197
 

LPZ

macrumors 65816
Jul 11, 2006
1,221
2
Code:
10 hops max, 52 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *

thats what i got for the first traceroute i tried and so i went back and took another look at the other computer and it seems the ip for the ssh has changed, so after inputting that new ip onto the traceroute its giving me errors of the host being down

ex
Code:
  8  * *traceroute: sendto: No route to host
traceroute: wrote ##### 52 chars, ret=-1
 *
traceroute: sendto: Host is down
 9 traceroute: wrote #### 52 chars, ret=-1
 *traceroute: sendto: Host is down
traceroute: wrote #### 52 chars, ret=-1
 *traceroute: sendto: Host is down
traceroute: wrote ###### 52 chars, ret=-1
 *
10  * * *

You don't seem to be reaching anything. Not even a router.
 

norcal707

macrumors newbie
Original poster
Jan 30, 2013
5
0
You don't seem to be reaching anything. Not even a router.

Code:
traceroute to 74.125.226.197 (74.125.226.197), 10 hops max, 52 byte packets
 1  10.141.32.1 (10.141.32.1)  2.230 ms  1.907 ms  3.153 ms
 2  172.16.251.1 (172.16.251.1)  3.063 ms  1.934 ms  2.585 ms
 3  172.19.100.169 (172.19.100.169)  4.848 ms  2.755 ms  3.200 ms
 4  172.30.101.2 (172.30.101.2)  3.644 ms  3.049 ms  3.708 ms
 5  206.206.223.58 (206.206.223.58)  4.669 ms  4.357 ms  3.833 ms
 6  vlan143.car1.phoenix1.level3.net (4.53.104.105)  6.175 ms  5.767 ms  7.222 ms
 7  ae-2-5.bar1.phoenix1.level3.net (4.69.148.118)  6.673 ms  6.855 ms  6.587 ms
 8  ae-0-11.bar2.phoenix1.level3.net (4.69.148.114)  5.640 ms  6.053 ms  6.457 ms
 9  ae-4-4.ebr2.losangeles1.level3.net (4.69.133.38)  17.311 ms  14.342 ms  13.140 ms
10  ae-82-82.csw3.losangeles1.level3.net (4.69.137.26)  13.257 ms
    ae-62-62.csw1.losangeles1.level3.net (4.69.137.18)  13.256 ms
    ae-92-92.csw4.losangeles1.level3.net (4.69.137.30)  14.132 ms

I have a feeling it is something having to do with the type of router, I dont have access to seeing the router or even know what kind of router they have as it is the universities internet. So they may have restrictions to prevent ssh from happening? Trying to think of every possible reason for this to be happening and thats the only thing i can think of other than user error haha
 

LPZ

macrumors 65816
Jul 11, 2006
1,221
2
Code:
traceroute to 74.125.226.197 (74.125.226.197), 10 hops max, 52 byte packets
 1  10.141.32.1 (10.141.32.1)  2.230 ms  1.907 ms  3.153 ms
 2  172.16.251.1 (172.16.251.1)  3.063 ms  1.934 ms  2.585 ms
 3  172.19.100.169 (172.19.100.169)  4.848 ms  2.755 ms  3.200 ms
 4  172.30.101.2 (172.30.101.2)  3.644 ms  3.049 ms  3.708 ms
 5  206.206.223.58 (206.206.223.58)  4.669 ms  4.357 ms  3.833 ms
 6  vlan143.car1.phoenix1.level3.net (4.53.104.105)  6.175 ms  5.767 ms  7.222 ms
 7  ae-2-5.bar1.phoenix1.level3.net (4.69.148.118)  6.673 ms  6.855 ms  6.587 ms
 8  ae-0-11.bar2.phoenix1.level3.net (4.69.148.114)  5.640 ms  6.053 ms  6.457 ms
 9  ae-4-4.ebr2.losangeles1.level3.net (4.69.133.38)  17.311 ms  14.342 ms  13.140 ms
10  ae-82-82.csw3.losangeles1.level3.net (4.69.137.26)  13.257 ms
    ae-62-62.csw1.losangeles1.level3.net (4.69.137.18)  13.256 ms
    ae-92-92.csw4.losangeles1.level3.net (4.69.137.30)  14.132 ms

I have a feeling it is something having to do with the type of router, I dont have access to seeing the router or even know what kind of router they have as it is the universities internet. So they may have restrictions to prevent ssh from happening? Trying to think of every possible reason for this to be happening and thats the only thing i can think of other than user error haha

Time to speak to someone in the university's IT or network group. It seems you can access sites external to your campus network, but are blocked from reaching the machine you want to reach. Doesn't seem to have anything directly to do with ssh, since traceroute isn't even working.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.