[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving from openssh to ssh2

SMK> I want to run ssh2 because I really like the convenience and
SMK> security of using both the ssh2 server and ssh2 client software.
SMK> I am very comfortable using public keys for authentication and
SMK> want to allow only logins with that public keys. (I already know
SMK> how to configure the ssh2_config and sshd2_config to allow that.)
SMK> The box I am installing ssh2 on is run as a game server and web
SMK> server at a local ISP. This is mostly for hobby and learning
SMK> about Linux. The server is running Debian, obviously, (it must be
SMK> late).  I am running Win2k at home.

Do you know that latest version of openssh support ssh2 protocol? You
can upgrade to latest version of openssh instead.

SMK> I am a relative Linux Newbie, and there are some things I am still having
SMK> trouble understanding.  I have spent the entire evening looking for an
SMK> answer to my question.

SMK> I have already downloaded and installed ssh2 on my server.  I
SMK> have installed and configured ssh2 client on my home machine.  In
SMK> the past I have had other people install this software for me but
SMK> I want to be able to do it myself.  I just installed a clean
SMK> Potato Debian on the machine.  This was done to clean off a
SMK> year's bunch of junk that other people put on the box--these
SMK> people no longer have access to the server.

SMK> OK now that the introduction is over, here are my questions:

SMK> The  server is running ssh1.  How do I remotely

First create proper init strings in init.d: just copy /etc/init.d/ssh
to /etc/init.d/ssh2 (you should do it before removing old ssh of
course) and edit to change filenames (name of sshd binary and name of
file with PID). Now run 'update-rc.d ssh2 defaults'

SMK> 1. start sshd2 (it will say port 22 is in use)

First start it on another port to test your installation. In its
config file (sshd_config) put config param Port which allows to
specify non default port for sshd. See 'man sshd' for details. You ssh
client should be able to connect to non-standart ssh port. Once config
file edited run '/etc/init.d/ssh2 start'.

SMK> 2. kill and delete ssh1

'/etc/init.d/ssh stop'. If you need to remove ssh 'apt-get remove sshd'

SMK> 3. create the proper init strings in init.d (if this is where
SMK> that belongs) to link calls for sshd --->sshd2
SMK> 4. create the proper init string to run sshd2 on server startup
SMK> or reboot.

See above.

SMK> 5. Reboot the machine and NOT have to call the ISP tech support
SMK> to fix what I just did!

'/sbin/reboot' but you don't need it actually. At this moment you
should have new sshd running on non-standart port and no old
ssh. Change Port param to point to standart port back and restart new

'/etc/init.d/ssh2 restart'

Final hint: even if you stop and delete ssh your already opened
session will not be closed. So DO NOT close you ssh session unless you
are sure that everything is working. If you didn't closed your session
you will still be able to fix things.

| Ilya Martynov (http://martynov.org/)                                    |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/)                          |

Reply to: