Pages: [1]   Go Down
Author Topic: The security of the ssh connection  (Read 255 times)
0 Members and 2 Guests are viewing this topic.
daggett
Sr. Member
****

Karma: 0
Offline Offline

Posts: 109


View Profile
« on: December 07, 2006, 10:50:14 AM »

Hi,
I did a few modifications to the ssh configuration to make the connection between agents and the server.

When the public/private key configuration is running fine between agents and server, I created a script valid.sh in the pandora_server directory on the server as follow:
[code:1]#!/bin/sh
case "$SSH_ORIGINAL_COMMAND" in
*\&*)
echo "Rejected 1 "
;;
*\(*)
echo "Rejected 2 "
;;
*\{*)
echo "Rejected 3 "
;;
*\;*)
echo "Rejected 4 "
;;
*\<*)
echo "Rejected 5 "
;;
*\`*)
echo "Rejected 6 "
;;
rsync*pandora*data_in)
$SSH_ORIGINAL_COMMAND
;;
*)
echo "Rejected 7 "
;;
esac
[/code]
then I added in the $Pandora_home/.ssh/authorized_keys, before each pandora client key:
command="/opt/pandora/pandora_server/valid.sh" ssh-rsa ...KEY....== user@client

This excludes ANY attempt to do anything else than the rsync command as user pandora from each registered client to the server.

bye.
« Last Edit: January 01, 1970, 01:00:00 AM by daggett » Logged

Sancho Lerena
Administrator
Expert member
*****

Karma: 24
Offline Offline

Posts: 1151


I can see everything... with my glasses :-)


View Profile WWW
« Reply #1 on: December 09, 2006, 10:12:52 PM »

Quote from: "daggett"
Hi,
I did a few modifications to the ssh configuration to make the connection between agents and the server.

When the public/private key configuration is running fine between agents and server, I created a script valid.sh in the pandora_server directory on the server as follow:
[code:1]#!/bin/sh
case "$SSH_ORIGINAL_COMMAND" in
*\&*)
echo "Rejected 1 "
;;
*\(*)
echo "Rejected 2 "
;;
*\{*)
echo "Rejected 3 "
;;
*\;*)
echo "Rejected 4 "
;;
*\<*)
echo "Rejected 5 "
;;
*\`*)
echo "Rejected 6 "
;;
rsync*pandora*data_in)
$SSH_ORIGINAL_COMMAND
;;
*)
echo "Rejected 7 "
;;
esac
[/code]
then I added in the $Pandora_home/.ssh/authorized_keys, before each pandora client key:
command="/opt/pandora/pandora_server/valid.sh" ssh-rsa ...KEY....== user@client

This excludes ANY attempt to do anything else than the rsync command as user pandora from each registered client to the server.

bye.


Whow... nice !
« Last Edit: January 01, 1970, 01:00:00 AM by nil » Logged

-- See you in the other screen.

Pages: [1]   Go Up
Print
 
Jump to:  


SourceForge.net Logo  This site is monitored by Pandora FMS   ArticaST