Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Jun 19, 2012 1:14 pm 
Offline
Newbie

Joined: Fri Jun 15, 2012 10:11 am
Posts: 3
I've found this article which addresses the exact situation: http://library.linode.com/databases/pos ... in-macos-x

However, I am a little confused by the part where I need to specify
Code:
$remote_user
and
Code:
$remote_host
in the script, as well as where I should run this script from?

Am I supposed to run this tunneling script from my local mac or on the linode server? If the latter, is the $remote_host the same as the FQDN I have in /etc/hosts on my linode, and what should be the $remote_user in this case?

Thanks!


Top
   
PostPosted: Tue Jun 19, 2012 1:20 pm 
Offline
Senior Member

Joined: Wed Oct 20, 2010 12:35 pm
Posts: 111
Location: United Kingdom
Oops. Completely failed to read the above post correctly so you can delete this message :).


Top
   
PostPosted: Tue Jun 19, 2012 3:41 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
Using SSH proxy like this you have two users:

1. OS user whose account you SSH into
2. Database user (created with 'createuser' or 'createrole')

In case of that script, remote_user is the OS user, the SSH username. In that case you need pg_hba configured for local/host 127.0.0.1, ident or peer, and need a database user of the same name. Since the example in the script shows connecting to DB via localhost (which is the localhost on the Linode), you need the localhost setting in pg_hba, I recommend md5 method so you can authenticate with username and password and therefore have access to more than one user/database, while having single, unrelated SSH tunnel user.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: mattltm and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group