PDA

View Full Version : SSH help!




norcal707
Jan 30, 2013, 09:30 PM
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
Jan 30, 2013, 09:34 PM
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
Jan 30, 2013, 09:36 PM
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
Jan 30, 2013, 09:54 PM
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
Jan 31, 2013, 03:35 AM
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

ssh -vvv username@ip_address

What output do you get?

norcal707
Jan 31, 2013, 02:35 PM
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

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
Jan 31, 2013, 02:44 PM
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?

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
Jan 31, 2013, 03:07 PM
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?

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.

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
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 * * *

LPZ
Jan 31, 2013, 03:12 PM
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.

traceroute -m 10 74.125.226.197

LPZ
Jan 31, 2013, 03:24 PM
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
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
Jan 31, 2013, 05:03 PM
You don't seem to be reaching anything. Not even a router.

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
Jan 31, 2013, 06:02 PM
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.