LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to connect 2 computers (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-connect-2-computers-900486/)

enero forte 09-06-2011 09:22 PM

chrism01,
the problem is when it DOES NOT appear...
when I see the prompt

root@ubuntu:~#

its clear to me we are at the beginning.

but as I was doing ssh , dont remember what exactly, i couldn't come to prompt!

once the cursor was blinking at the beginning of empty row

other time it was showing at which page in man. Im but i couldn't get out.
so i had to terminate the window...and it asked me
"are u sure?there is process going on"

but, don't bother! I will find it once I get more experience with the terminal

enero forte 09-06-2011 09:32 PM

ramkatral, im right now doing the steps shown hire:

https://help.ubuntu.com/community/ServersBehindNAT

because you pointed to NAT, the whole thing (pc-rooter-net-rooter-pc) was not clear to me. I was thinking more like this: rooter-rooter


schneidz, i can reach the fritz.box without problem. its at home so I did the connection and know the interface.
but the other rooter gives me trouble....there are too much people messing around it. since it is in a bar...

enero forte 09-07-2011 04:41 AM

chrism01, when the prompt with my user-name is there i know we are OK
the problem was taht there was no prompt at beginning!
anyhow. when I can put my question clearly (explain WHAT operation I was doing) than we come back to subject.

ramkatral, my rooter is

FRITZ!Box Fon WLAN 7113 (UI)

i go in and out whenever i write the name of it in my browser and than identify myself with password.

DSL -ready
WLAN - on, secured
LAN -not connected

right now Im doing the steps from this manual:

https://help.ubuntu.com/community/ServersBehindNAT

since you show me the crucial mistake in my logic Im on a better way.
I was seing more the things like this
computer-computer
and the routers between as a part of the whole connection
now I see that the things are more

computer -router -net -router -computer
et essential is the connectin between ma computer and my rooter and the same is in the bar.

enero forte 09-07-2011 05:16 AM

first problem on Horizont!

when I try to find to which PORT listens my SERVER
(I go to NETWORKTOOLS, than PORTSCAN and I put the address that DEVICE say is my computer uses to talk with the router)

Hire I have to see on right somewhere SERVER and on left the NUMBER of the Port. BUT all I see is this (the numbers of ports are changed):
port state service
5700 open unknown
38573 open unknown
57862 open unknown

I DONT KNOW WHICH OF THOSE PORTS IS THE ONE I NEED!!!

enero forte 09-07-2011 05:22 AM

Local Peer
12x.0.0.x:xxx
::1:6xx
*:5xxx users:(("vino-server",1515,19))
:::5xxx users:(("vino-server",1515,18))


this is what I get when I do

ss -altnp | perl -ne '@_=split;printf"%-20s %s\n",@_[2,4]'


again it does not say anything about SSHd


do I have to Install SSH again?

schneidz 09-07-2011 11:10 AM

not able to figure out what the previous posts are trying to tell us.

from your home-pc type in ssh localhost and see if you can login. then see if you can login from another pc connected to the same wifi router.

Quote:

Originally Posted by enero forte (Post 4463446)
chrism01,
the problem is when it DOES NOT appear...
when I see the prompt

root@ubuntu:~#

its clear to me we are at the beginning.

but as I was doing ssh , dont remember what exactly, i couldn't come to prompt!

once the cursor was blinking at the beginning of empty row

ctrl-c to cancel... ssh is probably stuck trying to connect to your frizzy box (whatever that is).

enero forte 09-07-2011 03:07 PM

ubuntu plague!
 
Quote:

Originally Posted by schneidz (Post 4463994)
not able to figure out what the previous posts are trying to tell us.

from your home-pc type in ssh localhost and see if you can login. then see if you can login from another pc connected to the same wifi router.

ctrl-c to cancel... ssh is probably stuck trying to connect to your frizzy box (whatever that is).

ok. than slowly.


I try to find the TCP or UDP port my server listens on. when i know it i can write same number in my router and -did it!to check this i used this command:

ss -altnp | perl -ne '@_=split;printf"%-20s %s\n",@_[2,4]'

and I guess, I was expecting to see a port already with sshd server beside it.now i think I had to choose one of the open numbers and just put it in the router

now i will try to connect as you say. to do this Im installing on another laptop also ubuntu...
The Jinn is out of the bottle ! now, in this house, the time we spent benind the blue screen gets less and less....Ubuntu eats all machines around!
-------
fritzbox is just a name of a product line of routers. I assumed ppl will understand I mean a classic home router -those the phone companies give you with one or two telphn numbers and internet.
yes, there are things that you have not heard of .its totaly ok :)

enero forte 09-07-2011 03:12 PM

result
 
Quote:

Originally Posted by schneidz (Post 4463994)

from your home-pc type in ssh localhost and see if you can login.


ssh: connect to host localhost port 22: Connection refused

enero forte 09-07-2011 03:47 PM

Itry to check if ssh is up at 22 port by command:
netstat -ln | grep 22

and the result was:

unix 2 [ ACC ] STREAM LISTENING 14974 /tmp/orbit-bitch/linc-660-0-472817f272259
unix 2 [ ACC ] STREAM LISTENING 15524 /tmp/orbit-bitch/linc-6e3-0-6b224a7d77a47
unix 2 [ ACC ] STREAM LISTENING 11223 /tmp/keyring-UoESQJ/pkcs11
unix 2 [ ACC ] STREAM LISTENING 12282 /tmp/orbit-bitch/linc-626-0-7677a80be853e
root@ubuntu:~#

so than I try to start sshd with command :


root@ubuntu:~# /usr/sbin/sshd -d
result is:
/etc/ssh/sshd_config: line 89: Bad configuration option: ps
/etc/ssh/sshd_config: line 90: Bad configuration option: exit
/etc/ssh/sshd_config: terminating, 2 bad configuration options


ANY IDEAS FROM HIRE ON ?

chrism01 09-07-2011 07:54 PM

Ok; lets do one problem at a time, otherwise it'll ge tmessy.
First, assuming you want to use ssh, let's establish which box is the 'client' and which the 'server' eg

client(ssh) --> server (sshd)

ie client issue the ssh cmd (not sshd) to connect to server, which should be running sshd (d = daemon; server only)

Typically
Code:

client> ssh user@server_fully-qualified_domain-name

# OR
client> ssh user@ip.of.server.here

Note that the server needs to have port 22 open on the firewall as sshd normally listens on port 22.
The client chooses a random outgoing port (>1023), so you can usually ignore firewall settings on client, as these are normally allowed.
To check firewall
Code:

iptables -nvL
on both systems.
Note also that if your server is not directly on the internet, but going through a router/modem, then you'll need to enable port forwarding on the router to fwd port 22 to the server for incoming cxns.

HTH

Re your sshd -d test; its telling you you have bad syntax in the cfg file /etc/ssh/sshd_config: post this also.
http://www.openbsd.org/cgi-bin/man.c...penBSD+Current

schneidz 09-07-2011 08:04 PM

^ your sshd_config file probably got messed up... try commenting out those lines.

chris makes some great points.
lets start from the inside out.
in the first terminal run this:
sudo /etc/init.d/ssh stop
sudo sshd -d -d -d
# open another terminal window and type:
ssh -v -v -v localhost

copy and paste the output into your next post.


once that is working the next step would be to run:
ssh -v -v -v <internal-ip-address-of-server>
on another machine in your house.

the step after that would be to run:
ssh -v -v -v <ip-address-of-router>
from the bar.

ramkatral 09-07-2011 08:47 PM

That's what I keep trying to tell you. You are getting connection refused because your router is not forwarding the ssh request to the server. Nothing anyone here tells you will work until you tell your router to forward connections on port 22 to the server. That must be done first and formost. Once you do that you can ssh to the server to your heart's desire.

Edit: I just saw the part about the bad configuration file. I'm a hardware and networking kinda guy. I'll let these guys more knowledgeable with that part help.


All times are GMT -5. The time now is 09:30 AM.