LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-01-2010, 02:09 PM   #31
vbx_wx
Member
 
Registered: Feb 2010
Posts: 181

Original Poster
Rep: Reputation: 16

thanks for your patience i will learn now more about ssh
 
Old 04-01-2010, 02:16 PM   #32
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

No problem, you're welcome. I'm also looking if I can find some other reason that might cause this behavior. I'm always intrigued with questions that I cannot find an answer to. So, tomorrow I'm installing Fedora on an extra pc I have and see where it gets me. I'll post results here if you haven't found a solution before me.

Kind regards,

Eric
 
Old 04-01-2010, 02:34 PM   #33
vbx_wx
Member
 
Registered: Feb 2010
Posts: 181

Original Poster
Rep: Reputation: 16
i was wondering if the cause is that i connect to localhost,maybe if i connect to a remote host,it doesnt exit....
 
Old 04-01-2010, 02:42 PM   #34
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
I've tried it on my Slackware laptop and was able to login without a problem, normally if the ssh server is configured correctly and there are no programs like selinux or firewall enabled, then you should be able to login to the localhost using ssh.

You could try to ssh to a remote host if you have credentials on that host and if the ssh server on the remote machine is setup.

Kind regards,

Eric
 
Old 04-01-2010, 03:13 PM   #35
vbx_wx
Member
 
Registered: Feb 2010
Posts: 181

Original Poster
Rep: Reputation: 16
but if a shh server is not installed on a remote host,so it doesnt connect no ?
 
Old 04-01-2010, 03:18 PM   #36
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

That's correct, if there's no ssh server installed on the remote host then you will not be able to connect to it using ssh.

Kind regards,

Eric
 
Old 04-01-2010, 03:19 PM   #37
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Have you posted everything when you attempt to login? From everything you posted you seem to be logged in successfully.

I am even more confused then EricTRA.
 
Old 04-01-2010, 03:21 PM   #38
vbx_wx
Member
 
Registered: Feb 2010
Posts: 181

Original Poster
Rep: Reputation: 16
if i log in succesfully...then why can i not send commands,thats what is confusing to me,or only to a rmeote host can i send commands
 
Old 04-01-2010, 03:26 PM   #39
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
No, normally when you login to your localhost using ssh, you're just opening a shell session. In that session you can run the same commands as if you were using a regular shell, at least that's how it works on my laptop. The functioning is the same as if you were connecting to a remote server. It's just a protocol to login remotely to a machine and run any shell command.

The fact that you exit (automatically) right after providing your password is somewhat dark to me, but once you get that fixed you could run ssh sessions on your local host without a problem. I imagine it's for learning purposes you want to do this, since there is no real need for it. The main purpose of SSH is to provide a secure communication protocol to connect to remote machines.

Kind regards,

Eric
 
Old 04-01-2010, 03:36 PM   #40
vbx_wx
Member
 
Registered: Feb 2010
Posts: 181

Original Poster
Rep: Reputation: 16
i was just curios,because now i made a client server program and i didnt know how to test the server separately,and i search on google,and saw some examples with telnet...and i begun to read about it,what it do,then i find out about nmap,i tried to learn about it and i understood that if u find a service with the port open you can connect to it,so i ask my friedn to give me his IP and scan it and found that 5101 port that was open,and tried to connect to it.....but now i realized that,u can connect to it if your a hacker or something but i`m a very curios man,and i dont use linux,only for 3-4 months now and i like to discover all kind of stuff ...
 
Old 04-01-2010, 03:47 PM   #41
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
It's a great thing that you're in discovery mode That's what Linux is all about, learning and discovering. As you stated a client/server program is a two way communication, you'll need a server on one end that listens on a specific port and a client that connects to that port from another machine. There are a lot of examples of that technology; FTP, Telnet, SSH, IMAP, and so on.

But you must understand the nature of the beast before you can tame it. If you try to connect using SSH or Telnet to any port other then the one that's configured on the server side then you'll fail, you'll be unable to connect.

So if you have a SSH server setup to listen to the standard port 22 then you can only connect to that server on that specific port. Same for FTP on port 21, Telnet on 23, POP on 110, SMTP on 25, IMAP on 143 and so on.

But knowing that still doesn't solve the fact that you get thrown out of your ssh session when you login on your localhost.

Just out of curiosity, what kind of program have you written?

Kind regards,

Eric
 
Old 04-01-2010, 03:54 PM   #42
vbx_wx
Member
 
Registered: Feb 2010
Posts: 181

Original Poster
Rep: Reputation: 16
well the server listen to port 4196 and awaits a client to connect and then awaits commands to execute(i tried to make them like the commands in linux:cat,to read a file,mkdir,remove dir/file,and send file bettwen them,but still having some problems with them) ,and the client connects and send commands to server,adn the server sends back what he done
 
Old 04-01-2010, 03:55 PM   #43
vbx_wx
Member
 
Registered: Feb 2010
Posts: 181

Original Poster
Rep: Reputation: 16
in programming i love client-server programs the most esspecially programs related with the internet,everythings else its boring to me
 
Old 04-01-2010, 03:58 PM   #44
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Sounds pretty interesting. I know close to nothing when it comes to programming, just a little bash scripting and planning to start learning perl. Hope you get everything working.

Kind regards,

Eric
 
  


Reply



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
Unable to telnet to Linux Host inspite of installing telnet-server RPM - Need Help sinamdar Linux - Software 7 04-11-2009 07:09 AM
Can't end telnet servcie in xinetd when close remote telnet cliend forcely zeroneworld Linux - Newbie 2 12-09-2007 08:47 PM
Can't end telnet servcie in xinetd when close remote telnet cliend forcefully. zeroneworld Linux - General 1 12-06-2007 07:17 AM
Running Telnet in a script, want to save Telnet output, howtodothis??? anil3 Linux - Software 2 03-08-2006 04:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:13 AM.

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
Open Source Consulting | Domain Registration