Score:0

psql shell over ssh via bash script doesn't get user input

tr flag

I'm opening a ssh connection and then go into a psql shell. This works, I get the prompt. I can also input commands like "\dt". But I don't get any output. As I can get output in general, I rather think the input didn't get to the remote or psql shell. How can I fix this? I thought the -tt option to ssh already handled it, but apparently not.

Pseudo code:

#!/bin/bash -i
ssh -tt user@host <<< "psql \" host=...\"" 

(I don't think -i in the shebang is actually needed)

steros avatar
tr flag
Using OSX in my case btw.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.