SSH

Why does doing

ssh [email protected]

not work, but doing

ssh 192.168.08
work?

Pic related.


In the first and second scenarios, assume I am "user".

WHY ARE THERE DISCREPANCIES?

IP at 192.168.0.4 is using ubuntu server and the IP at 192.168.0.8 is a raspberry pi I have NOT port forwarded.

This is some crazy shit Sup Forums

Other urls found in this thread:

pubs.opengroup.org/onlinepubs/9699919799/functions/inet_addr.html
0x6baab917/
twitter.com/NSFWRedditGif

bump

when you only put the IP address, you are not defining the username of the server, so SSH implies the username of your computer is the same username as the one you want to login with.

So if your username is Paul, and your server does not have that same username registered, it will always fail.

yeah i get that dumbfuck

the question is why you don't need the last decimal in the ip address all the time

You're also mistyping the IP address in some places. Sometimes you have 192.168.08 (incorrect; could be interpreted as a hostname) and sometimes you have 192.168.0.8 (correct).

jason@jason-desktop:~$ ssh 192.168.1.2
The authenticity of host '192.168.1.2 (192.168.1.2)' can't be established.
ECDSA key fingerprint is SHA256:A2b1Abew0p87P+Cz+wJKi//NW9ojnfOPLgQ+rojj5Zk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.2' (ECDSA) to the list of known hosts.
[email protected]'s password:

YES BUT IT WORKS WITHOUT THE DEICMAL AT THE END SOMETIMES
LOOK AT THE SCREENSHOT

Stop yelling, dingus.
What happens when you ping 192.168.08? Post a screenshot of that.

ssh [email protected]
Doesn't work, though; not even once in your screenshot.

...

.

I mean 192.168.04 works but not 192.168.08

I don't understand why the decimal matters sometimes and sometimes not.

I understand that adding the decimal is the right way to do it, but I want to know why it will work without it

Okay, so we've now established that 192.168.08 is a hostname on your network.

Is the IP address of the machine you are pinging from 192.168.0.8? And are you on a Mac (it looks like it from the nice font rendering)?

yeah im on a mac

yes the ip address of the machine is 192.168.0.8

Type hostname. What do you get?

I'm assuming one of two things are going on here:
1 - Your computer's hostname is 192.168.08
2 - You have 192.168.08 defined in your hosts file and it's pointed at 192.168.0.8

Just using 192.168.08 as an address is invalid, unless something has been setup to make it work (like a hostname). There are tons of ways to implement this, though.

Just Mac things.

From what I understand it appears that every computer on my network accepts that ending without the decimal EXCEPT the raspberry pi. I think that it's probably a weird hostname thing...

ok thanks


also i made a small mistake the machine im pinging from isn't 192.168.0.8 its something else

the raspberry pi is the machine with 0.8 and its the only one which wont accept being pinged from the abbreviated ending.

You dumbfuck. 192.168.0 is your local network name and the last decimal is for local machines. When you don't put the fourth byte, it automatically connects you to the lowest machine that has port 22 open or whatever machine that's being forward to port 22 in your router rules.
Stop yelling and use wikipedia you dumb cunt.

oh cool
can you link the article

rude

>mac
how unsurprising

And yet again, another useless shitskin gets told on Sup Forums.
Worthless trash.

That's not how it works.
If you put in three of the four octets then it assumes that the third octet is the fourth and places the 0 in the third.

It appears to only be an issue with a leading 0.
192.168.8 will work, 192.168.01 - 192.168.07 will work, but 192.168.08+ does not work.

Holy fuck you're retarded

>
this is kind of odd
it defaults to the ip 3 spaces before it

Yea, I just came to that conclusion too on when I just took a shit.

With a leading 0 it converts to counting in octal.

Because it's using inet_addr() and all the brain-deadness that entails. The leading 0 means that portion of the address is interpreted in octal. 8 is not a valid octal digit.

Read pubs.opengroup.org/onlinepubs/9699919799/functions/inet_addr.html and learn.

Here's something to blow your mind
0x6baab917/

Goat.cx.
moid.org/ed flashbacks.

did you screenshot this on iPhone x?

SSH user:pass@IP

>yeah im on a mac
that explains a lot kek

can someone explain

Just include the 0 next time.

>mac
That's why

ITT two turbo tards among 10 normie tards

You guys are dumb as fuck, jesus christ

man inet_pton:

INTERNET ADDRESSES
Values specified using the `.' notation take one of the following forms:

a.b.c.d
a.b.c
a.b
a

When four parts are specified, each is interpreted as a byte of data and assigned, from left to right, to the four bytes of an Internet address. Note that when an Internet address is
viewed as a 32-bit integer quantity on the VAX the bytes referred to above appear as ``d.c.b.a''. That is, VAX bytes are ordered from right to left.

When a three part address is specified, the last part is interpreted as a 16-bit quantity and placed in the right-most two bytes of the network address. This makes the three part
address format convenient for specifying Class B network addresses as ``128.net.host''.

When a two part address is supplied, the last part is interpreted as a 24-bit quantity and placed in the right most three bytes of the network address. This makes the two part address
format convenient for specifying Class A network addresses as ``net.host''.

When only one part is given, the value is stored directly in the network address without any byte rearrangement.

All numbers supplied as ``parts'' in a `.' notation may be decimal, octal, or hexadecimal, as specified in the C language (i.e., a leading 0x or 0X implies hexadecimal; otherwise, a
leading 0 implies octal; otherwise, the number is interpreted as decimal).

I came here to help you but you're a rude cunt user, get fucked

false

correct

255.255.255.255
ff.ff.ff.ff
0xffffffff

>Helping anyone on 4turd
>Not intentionally tricking them into destroying their life or their equipment
It's like it's actually your 1st day

Wew edgy

Actually I, , wasn't fully correct.

>If you put in three of the four octets then it assumes that the third octet is the fourth and places the 0 in the third.
If you only put three octets then the third is counted as 16 bits instead of 8 bits and fills accordingly, so the third value could be anything from 0-65,535 and will determine the contents of the last two octets.

Example,
ping 172.16.4116

Pinging 172.16.16.20 with 32 bytes of data:
Reply from 172.16.16.20: bytes=32 time

This entire thread explains a lot about the current state of Sup Forums, and the growing presence of roleplayers.

What is this visual AIDS

>you can type 127.1 instead of 127.0.0.1
>you can type 10.1 instead of 10.0.0.1
woah really made me think about my computer degree

The only thing you have to remember in that case is that the second digit is 24bit instead of 8.
It's really just a denotation difference.

The cool thing, as pointed out in , is that on a large network you can basically give every device a four or five digit number that corresponds to their address on the class B or A network, so from a helpdesk point of view when someone calls up you can just say "what's the number on the machine?" and get four digits and that's all you need for the IP address.

If only the company I work for weren't retarded

Wtf is this shit. I don't eben. Please learn networking 101. IPv4 needs 4 octets...

Time to educate yourself.

You can cut the air with that edge, kys.