LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2011, 10:22 PM   #16
enero forte
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled

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
 
Old 09-06-2011, 10:32 PM   #17
enero forte
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
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...
 
Old 09-07-2011, 05:41 AM   #18
enero forte
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-07-2011, 06:16 AM   #19
enero forte
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
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!!!
 
Old 09-07-2011, 06:22 AM   #20
enero forte
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
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?
 
Old 09-07-2011, 12:10 PM   #21
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,028

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
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 View Post
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).

Last edited by schneidz; 09-07-2011 at 12:23 PM.
 
Old 09-07-2011, 04:07 PM   #22
enero forte
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
ubuntu plague!

Quote:
Originally Posted by schneidz View Post
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
 
Old 09-07-2011, 04:12 PM   #23
enero forte
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
result

Quote:
Originally Posted by schneidz View Post

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

ssh: connect to host localhost port 22: Connection refused
 
Old 09-07-2011, 04:47 PM   #24
enero forte
LQ Newbie
 
Registered: Aug 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
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 ?

Last edited by enero forte; 09-07-2011 at 04:54 PM.
 
Old 09-07-2011, 08:54 PM   #25
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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
 
1 members found this post helpful.
Old 09-07-2011, 09:04 PM   #26
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,028

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
^ 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.

Last edited by schneidz; 09-07-2011 at 09:26 PM.
 
Old 09-07-2011, 09:47 PM   #27
ramkatral
Member
 
Registered: Aug 2011
Location: Tryon, NC
Distribution: Slackware x64, Arch x64
Posts: 74

Rep: Reputation: 12
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.

Last edited by ramkatral; 09-07-2011 at 09:49 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
We have moved computers and now I canít connect. m_s_weir Linux - Wireless Networking 2 02-14-2011 09:21 AM
Two computers need to connect to the net through a third one. dalek Linux - Networking 4 10-01-2005 02:16 AM
Other computers cant connect to me? empiiricus Linux - Networking 1 05-17-2004 10:31 AM
My computers cannot connect to each other using samba ! Help! ZhiYi Linux - Networking 7 02-12-2003 08:08 AM
Trying to connect to other computers on the network hextex Linux - Networking 1 05-04-2001 09:13 PM


All times are GMT -5. The time now is 01:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration