Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

After i upgraded openSSH to the latest version: OpenSSH_5.9p1 i tried to change the /etc/ssh/sshd_config , tried to set enable chrooted access and restarted the ssh with #/etc/init.d/sshd restart. But it gives the an error specific to the old version: OpenSSH_4.5p1.

When i tried to reconnect from putty i connected to OpenSSH server OpenSSH_4.5p1. Then #ssh -v shows new updated version OpenSSH_5.9p. Looks like there is 2 version of SSH is running now.

/etc/init.d/sshd still uses the old version /usr/sbin/sshd. Looks like the new version been installed in /usr/local/bin/ssh. In /etc/init.d/sshd i tried changed SSHD from /usr/sbin/sshd to /usr/local/bin/ssh. But then i could not restart the ssh due to this error:

Starting sshd: usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command] [FAILED]

Any suggestion ?

thanks.

share|improve this question
    
It looks like you are mixing up ssh server with ssh client. What is the output of rpm -qa | grep ssh? Please edit your post and give use the exactly error when you restart sshd and connect from PuTTY with ssh -v? –  quanta Sep 12 '11 at 7:57
    
result of rpm -qa | grep ssh is empty. the exact error is as above. After connect from putty, #ssh -v shows OpenSSH_5.9p1. –  taras Sep 12 '11 at 8:04
    
As @quanta said, /usr/local/bin/ssh isn't the server, it's the client. You will want to look for /usr/local/bin/sshd (or similar). That will be the server. –  slillibri Sep 12 '11 at 8:20
    
I could not find any other sshd after upgrade, there is only one sshd which is the old version. Can u suggest where how can i check it ? the upgrade process went well, no error, after the upgrade, client version is changed, but server version still the same. I followed this manual to upgrade it: bonigala.com/how-to-update-openssh-on-red-hat-fedora-core-7 –  taras Sep 12 '11 at 8:36
add comment

1 Answer

up vote 1 down vote accepted

You are confusing OpenSSH server with OpenSSH client.

After i upgraded openSSH to the latest version: OpenSSH_5.9p1 i tried to change the ssh_config , tried to set enable chrooted access and restarted the ssh with #/etc/init.d/sshd restart. But it gives the an error specific to the old version: OpenSSH_4.5p1.

ssh_config is the configuration file for client.

/etc/init.d/sshd still uses the old version /usr/sbin/sshd. Looks like the new version been installed in /usr/local/bin/ssh.

In /etc/init.d/sshd i tried changed SSHD from /usr/sbin/sshd to /usr/local/bin/ssh. But then i could not restart the ssh due to this error:

/usr/sbin/sshd is OpenSSH (server) daemon while /usr/local/bin/ssh is OpenSSH client.

result of rpm -qa | grep ssh is empty

It means that you removed all the OpenSSH binary packages. If you want to compile the new version from source, make sure that you install the OpenSSH server and edit your init script to point the daemon to the new location (/usr/local/sbin/sshd).

share|improve this answer
    
thanks for the reply. i followed this tutorial for the upgrade: bonigala.com/how-to-update-openssh-on-red-hat-fedora-core-7. it means i only upgaded client ? can u advice how can i upgrade the ssh server to the latest one so i can enable chrooted access. Is it safe to upgrade the ssh server via ssh itself remotely ? –  taras Sep 12 '11 at 8:39
    
Update: I changed the server /etc/ssh/sshd_config not /etc/ssh/ssh_config. –  taras Sep 12 '11 at 8:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.