LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-211484/)

lyar1031 07-30-2004 10:52 AM

ssh
 
Ok,

First I would like to say thanks for all the help.....Here is the question

1. I have 2 Pc's connected through a router. one is a RedHat box the other XP. Both can communicate with the web fine.

2. The ip on the Red Hat box is 192.168.1.114 (I think)
3. I can ping the RedHat box from my Windows box
4. SSH from my Windows box to REDHAT box and it times out

However, at the command line inside RedHat I can ssh to myself

The question is I CANNOT get Telnet from my XP box to REDHAT box using ssh. In the RedHat box I went to server configuration and made sure sshd is running. Is there a way to determine if sshd daemon is running and if it is not how to I start that process?

I did a ps -ef and I do not remember seeing sshd or anything like that. I did not check to validate the port number though

Oh ya, what is the defallut port to connect at is it 22. I think on my router setting I allow connections on ports 20-24 on ip address 192.168.1.114

Thanks,
any other suggetions would be great!!

win32sux 07-30-2004 11:29 AM

this will show you if sshd is running:

ps aux | grep sshd

btmiller 07-30-2004 12:34 PM

Make sure you don't have a firewall running on the Red Hat box that's blocking access to port 22.

lyar1031 07-30-2004 02:34 PM

Thanks, I did not know Red Hat has a firewall on it...How do I allow port forwarding for port 22 on the RedHat box?

Is it a configureation file that I have to manually edit?

btmiller 07-30-2004 02:42 PM

In Fedora at least you can change it with system-config-securitylevel -- in RH I think it may be redhat-config-firewall but I'm not sure. The way to do it by hand is to modify your iptables ruleset, but if you aren't familiar with it, it can be sort of difficult. I don't even know that your firewall is the problem, but it's something to look at.

lyar1031 07-30-2004 06:34 PM

Correct...On Redhat

This was the problem

1. goto system settings-->security level--->check ssh

thanks

statmobile 07-30-2004 10:42 PM

Whoa Whoa Whoa

At first I interpreted your post to be a typo. Are you trying to telnet into ssh? Be sure about this, because it won't happen. In order to ssh into your redhat machine, you need an ssh client on windows. I personally use cygwin with all it's little goodies, but if you want help on that. You'll need to ask again. For now, I'll just point you to a great free program for M$ PuTTY

Download this, and now you'll be able to "ssh into your machine"

lyar1031 07-31-2004 04:32 AM

Yes, I can telnet into my machine. but I cannot ftp to it for some reason. I know sshd has an sftp attached to it, but I cannot seem to get it to work


Thanks

statmobile 07-31-2004 11:54 AM

Okay, let's be clear here.
I telnet'd into the machine means you typed "telnet machine"
I ssh'd into the machine means you typed "ssh machin"
ftp is insecure, because people can view everything you're typing. Almost nobody in this forum will recommend using telnet.

With that said, check out this link to another post

lyar1031 08-01-2004 01:28 PM

what is happenning is this. I am logging in from a XP machine to a UNIX machine using open ssh on my XP box.

1. I can ssh into the UNIX box fine. However, when I open up a transfer window using open ssh I get this error

"File transfer could not be started or exited unexpectedly. sftp-server is not in the path on the server side"

Now the file sftp-server is on my machine in the proper location.

I have been trying to get this to work for a few days now!!!

Thanks

statmobile 08-01-2004 01:44 PM

Hmm, I'm still unclear on whether you are doing this properly.

When you open up this ftp window, what do you mean?

>sftp <unixserver
$<password
$get filename
$quit
>ls (to see filename in current directory)

Is this what you're doing?

lyar1031 08-01-2004 02:29 PM

No I open up a file transfer window on my XP box using the program open ssh. It is a menu item options that just allows you to tranfer files using ssh by dragging and dropping files.

What is does is one window will display the contents of the unix box and the other window will display the contents of my XP box. The window will allow drap and drop of files.

I am thinking of just running another ftp serever and not using sftp

statmobile 08-01-2004 02:33 PM

Before I open up an insecure ftp server, I would try another sftp client. Try PuTTY . It's great, open source and free (as in beer). Never quite understood that one?!! Try using this first, and let me know if it works.

lyar1031 08-01-2004 02:53 PM

I CAN conenct to my Linux box from my xp box using putty. I wanted to be able to transfer files back and forth from my XP box and redhat box. I know that sshp come w/ an ftp server which is what I have on my Linux box.

However, psftp DOES NOT work it will just sit there never allowing me to log in.

lyar1031 08-01-2004 03:08 PM

actually, when I use psftp which is the secure ftp it prompts me to log in, but it hangs up after I enter the password!!

Example using psftp (putty version of ftp)

open 192.168.XXX.XXX
login as <user_name>
Using username<user_name>
<user_name>@192.168.XXX.XXX's password:

THIS IS where it hangs up, seems like it CANNOT authenticate my password!!

Thanks again fr the help

statmobile 08-01-2004 03:16 PM

Try to check this out, type:

cat /etc/ssh/sshd_config | grep Subsystem

It should read:

Subsystem sftp /usr/libexec/openssh/sftp-server

If the line is commented out with a # in front of it, then open the file (/etc/ssh/sshd_config) up with a text editor remove the #, then save it.

I forget how to restart all the daemons, so I would just reboot after that. Let me know how this turns out.

statmobile 08-01-2004 03:19 PM

I should say that the output could be slightly different, the key is whether or not the line is commented out. The config file probably knows exactly where the sftp binary is.

lyar1031 08-01-2004 03:28 PM

Subsystem sftp /usr/libexec/openssh/sftp-server

This LINE is not commented out in the sshd_config file

What are the permissions supposed to be on the file sftp-server.
this file is owned by "root" and belongs to group "root" Is this a problem?

lyar1031 08-01-2004 05:00 PM

The above posts show that I am trying to ftp from my XP box to Redhat box using psftp and it is hanging up when I enter the passwrod

OK I did this from my redhad box I type sftp 192.168.1.114

after the login sequence it asks for the password, when I type the password it says
"received message too long 538976288"

statmobile 08-01-2004 09:04 PM

Sorry lyar, but I had a party to go to, and I'm a little busy for the rest of the evening. I did find this, and I think this may be the problem. It may be a difference in the protocols, whether you're using ssh1 or ssh2. Here, check out the faq for openSSH
http://www.snailbook.com/faq/
Sorry, but I was almost sure that the other post was the solution. This faq specifically talks about the response you are getting.

micxz 08-01-2004 10:22 PM

Try scp instead of sftp ?

lyar1031 08-02-2004 10:30 AM

Hope the party was all-right...

I will try all the suggestions I get, but thanks for all the help w/ this

statmobile 08-02-2004 06:32 PM

What's the news on this, did that page help at all?

lyar1031 08-02-2004 06:36 PM

Actually I am about to read it....I read part of the link at work today, but I am about to try it...

Thanks

statmobile 08-02-2004 06:41 PM

If it isn't a problem between the ssh2 and ssh1 protocol, then I'll have to look into that some more. Problem is that I'm in the middle of working on a new installation, so I don't have much time.

lyar1031 08-02-2004 08:14 PM

Have not tried this yet...

could be an incompatibility issue as mentioned. I am going to get the latest OpenSSH for my windows box.

I need to verify which version of ssh I have on my Linux box. Don;t know how to do this quite yet...

I thought there was an rpm command something like

"rpm -a ssh" which should tell me which rpm I have

lyar1031 08-02-2004 09:21 PM

"File transfer could not be started or exited unexpectedly. sftp-server is not in the path on the server side"


In reference to the statement above from Openssh, it seems like that sftp-server IS NOT in the path when I log in as myself so

since /usr/local/bin is in the path (.bash_profile) then I copied the file sftp-server to /usr/local/bin/

Still did not work...the same error occurred!

Thanks for all the help again

lyar1031 08-02-2004 09:58 PM

put "/usr/libexec/openssh/ in the path...None worked still the same error

However, look at this link:

http://www.linuxquestions.org/questi...highlight=sftp

it is the same problem that I have. Furthermore in the link that "statmobile" sent http://www.snailbook.com/faq/

the same problem is mentioned in the section that talks about "received message too long"

The article states that server puts some text in the login script. However, I do not know how to modify the login script to eliminate this problem

Thanks

micxz 08-02-2004 10:08 PM

Quote:

Originally posted by lyar1031
I need to verify which version of ssh I have on my Linux box. Don;t know how to do this quite yet...
I thought there was an rpm command something like
"rpm -a ssh" which should tell me which rpm I have

-qa will list every package,then just grep for ssh.

rpm -qa | grep ssh

statmobile 08-09-2004 06:20 PM

Hey lyar, any I just read your post. For some reason I was unsubscribed from the discussion. Have you gotten it up and working yet?

I just came accross something on the net, and I wanted to relay it to you. It looks like the post you just referred to is discussing the problem as well:
http://www.openssh.org/faq.html#2.9

as for figuring out which protocol your server is running, I believe you can find it in the
/etc/ssh/sshd_config
file. Maybe it will say here whether or not you block the SSH1 protocol.

lyar1031 08-11-2004 08:48 PM

actually I have not figured this out...I may jsut set up another ftp server. Also, I am also unable to SSH into my Linux box from computers outside of my network. I think it is a router problem, but in my router I open port forwarding to ports 22-24 for the ip address of my Unix box. I think there is a firewall in Red Hat that I need to disable, but have not found that

Thanks


All times are GMT -5. The time now is 07:19 AM.