[Gllug] tunnelling through the web...
Simon Morris
smorris at batesuk.com
Thu Aug 14 14:14:00 UTC 2003
On Thu, 2003-08-14 at 14:29, Xander D Harkness wrote:
> I am not sure whether you can set up ssh on two ports; however you could
> use port forwarding on your server from port 80 to 22.
I've tried this and it works, but please don't accept it as a perfect or
very secure solution:
Tested on RH 9.0
1. cp /etc/ssh/sshd_config /etc/ssh/sshd_config2
2. cp /etc/init.d/sshd /etc/init.d/sshd2
3. chkconfig --levels 345 sshd2 on
(Note here you can also symlink the correct runlevel scripts to
/etc/init.d/sshd2 to start it at run time
4. Edit /etc/ssh/sshd_config2 to listen to a different port.
Port 81
5. Edit /etc/init.d/sshd2 to include the following lines
# Some functions to make the below more readable
KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid
OPTIONS='-f /etc/ssh/sshd_config2'
I only had to add the bottom line.
6. Start the second SSH daemon
/etc/init.d/sshd2 start
7. Test it by ssh'ing into your new daemon
ssh -p 81 simon at wt-linux-01
8. Sit back with satified grin and treat yourself to a cup of coffee as
mentioned on todays mailing list.
Hope that works for you.
--
Simon Morris
smorris at batesuk.com
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT/ d- s: a- C+++ UL+++$> P+> L+++$> E--- W++ N+++ o+ K? w !O M !V
!PS PE Y+ PGP++ t--- !5 X+ R- tv+++ b++ DI+@ D++ G> e h-- r+++ y+++
------END GEEK CODE BLOCK------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20030814/b3987ab1/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list