When you ssh into the bastion host, make sure you use the "-t" option to ssh.  
That forces a pseudo-terminal to get allocated.

I have no clue why that's not the default.



> On Jun 23, 2020, at 10:47 AM, Isaac Johnson <is...@wikimedia.org> wrote:
> 
> I'm interested in running some long-ish scripts that loop through the dump 
> replicas on Toolforge. Eventually, this sort of thing might move to crontab, 
> but for now it would be nice to run a screen session as we test / debug the 
> scripts. The problem is that if I run the scripts from my tool account (i.e. 
> after "become <tool-name>"), I get the following error: Cannot open your 
> terminal '/dev/pts/28' - please check.
> 
> The internet indicates that this is because there is a user mismatch because 
> of the "become" command [1]. The suggested solutions weren't clearly 
> applicable:
> * I can't just skip the "become" step and run the screen session as my 
> personal username as that's explicitly against the rules [2] (though it is 
> possible to start a screen session from my personal username without getting 
> the above error).
> * It's not clear to me that running the screen session as /dev/null is 
> possible / smart / secure etc. Essentially, I don't have a great read on 
> whether that actually is the correct solution or just another bad hack.
> 
> So is it possible to run screen sessions from my tool account? If so, does 
> anyone know how I might get around this issue?
> 
> [1] 
> https://stackoverflow.com/questions/21328140/screen-cannot-open-your-terminal-dev-pts-0-please-check
>  
> <https://stackoverflow.com/questions/21328140/screen-cannot-open-your-terminal-dev-pts-0-please-check>
> [2] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Rules 
> <https://wikitech.wikimedia.org/wiki/Help:Toolforge/Rules>
> 
> Best,
> Isaac
> 
> -- 
> Isaac Johnson (he/him/his) -- Research Scientist -- Wikimedia Foundation
> _______________________________________________
> Wikimedia Cloud Services mailing list
> Cloud@lists.wikimedia.org (formerly lab...@lists.wikimedia.org)
> https://lists.wikimedia.org/mailman/listinfo/cloud

_______________________________________________
Wikimedia Cloud Services mailing list
Cloud@lists.wikimedia.org (formerly lab...@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/cloud

Reply via email to