Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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 ...
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?
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.