Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ssh/sshd_start
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if [[ "$SSH_ENABLE" == "1" ]]; then
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
echo "export VISIBLE=now" >> /etc/profile

echo -e "\n" >> $PG_HOME/.ssh/authorized_keys # ensure new line
cat $PG_HOME/.ssh/id_rsa.pub >> $PG_HOME/.ssh/authorized_keys

echo '>>> STARTING SSH SERVER...'
Expand Down
9 changes: 8 additions & 1 deletion tests/ssh-connect/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ CHECKED_TEXT=

if [[ "1" != `docker-compose exec pgmaster bash -c 'gosu postgres ssh -o LogLevel=QUIET -t pgslave1 "cat /tmp/ssh_check"' | grep SSH_CHECK | wc -l | tr -d ' '` ]]; then
exit 1
fi
fi

docker-compose restart pgslave
sleep 5

if [[ "1" != `docker-compose exec -T pgmaster bash -c 'gosu postgres ssh -o LogLevel=QUIET -t pgslave "cat /tmp/ssh_check"' | grep SSH_CHECK | wc -l | tr -d ' '` ]]; then
exit 1
fi