Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3612878
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:03:18+00:00 2026-05-18T22:03:18+00:00

I’m trying to connect on my computer to a PostgreSQL database which is only

  • 0

I’m trying to connect on my computer to a PostgreSQL database which is only accessible on some server (db allows only local connections). I thought I could use port forwarding like this:

$ ssh someserver.com -L 5100:127.0.0.1:5432

and then connect to the database like this:

$ psql -h 127.0.0.1 -p 5100 -U postgres dbname

However, the problem is that on the server there is no password, but when I try to connect to the forwarded port it asks me for a password. When I leave it empty it returns “psql: fe_sendauth: no password supplied” and doesn’t let me connect.

What could be the reason? I have also a PostgreSQL instance on my computer, could this cause some conflicts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:03:19+00:00Added an answer on May 18, 2026 at 10:03 pm

    When you say that the db allows only local connections: you need to distinguish between “unix socket” connections and “TCP to localhost” connections, which are not the same thing and may be treated quite differently.

    To test: on the database server, see if adding -h 127.0.0.1 onto the psql commandline makes a difference in whether you can connect or not.

    The rules for whether a password is required or not are in pg_hba.conf. It might be that your database server is set to use “ident” authentication for unix (“local”) connections, so your Unix username is automatically accepted as the database username. Since that authentication method isn’t generally available for TCP/IP (“host”) connections, you have to use some other method- if it is set to “md5”, then it will require a password.

    Probably all you have to do is set a password for your user account on the database while connected locally: ALTER USER username PASSWORD 'password'. If you want to avoid being prompted for a password all the time when connecting remotely, write a .pgpass file to store it in your client user account: http://www.postgresql.org/docs/9.0/interactive/libpq-pgpass.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to select an H1 element which is the second-child in its group
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.