Linux - NewbieThis 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!
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.
I am not able to ssh from the remote windows machine into a newly installed UBUNTU gutsy machine.I can ping and ssh from the Ubuntu machine to Windows and other linux machines but couldn't ssh from any remote machine.I disable the firwall for port 22 but it dint work.
I am not able to see nmap output since the command is not there but to my surprise I am finding that #ssh localhost is itself not working....I just installed the OS and unable to ssh...I think I have not formatted the previous OS may be and I may be providing the same IP..Can it be possible?Totally confused?????Plzz ANyone I need quick help..as my project will be ruined????
ajeetraina, there are 2 things for SSH. There's SSH for the shell (which would allow you to go from your box to another), which is always installed. Then, you have the SSH Daemon. The latter being what you need. What this does, is it listens to a port (I believe 22, but I'm likely wrong) for any SSH requests coming in, and allows them to connect. When you go into bash, and type "ssh <server>", you are using the SSH client to connect to the SSH daemon running on the remote server.
To explain it another way, since that sounded a bit convoluted to me...
In bash, when you SSH to another machine, you are using the ssh client. The server you are connecting to is an ssh server. it is able to be one as it has the SSH daemon installed and running. For a more familiar example, firefox and a web server. Firefox is a client (ssh from bash), which connects you to a server, which is running Apache (ssh server daemon). If you have Firefox installed on a computer, you don't automatically have the ability to use another firefox browser to connect to it and see pages.
So, with Ubuntu's default configuration, you have ssh-client installed, to be used from within bash (think of the Firefox example). To allow for connections, you need to have openssh-server installed (as you would need Apache installed). the easiest way of doing this is to run sudo apt-get install openssh-server. I hope the explanation helped, and you didn't just jump to the quick answer.
Dude...ssh package is there...I can ssh to remote machine but when I am trying to ssh from remote windows or linux machine its not working
But do you just have the client part installed? If so, what you describe is exactly that I expect, You have to install the server part too. With ssh:
client = outgoing connections
server = incoming connections
Open a terminal and enter this command:
aptitude search openssh
The output will probably look like this:
i openssh-client - secure shell client, an rlogin/rsh/rcp replacement
p openssh-server - secure shell server, an rshd replacement
Note the i and p character that the start of the line. The i means installed. The p means not installed. If you see p before the openssh-server line this means it is not installed. You have to install it before you can connect to the machine from other machines using ssh.
So install openssh-server. You can use synaptic to do this is you like GUIs, else you can use apt-get or aptitude if you prefer the command line.
You seem to be suggesting that you think it should be installed by default, and that it is not is somehow an error. This is incorrect.
No not at all, it makes perfect sense not to install the server side with a fresh install for security reasons.
I hadn't used ssh much to speak of until about a year ago, that's when I discovered the server side needed to be installed also. I should have made myself a little more clear when I posted. Anyway, I wanted to let ajeetraina know that his/her experience is not unique and that your reply would fix their problem.