[arch-general] Ncurses over ssh
Hello everyone. I am using newsbeuter to handle my rss feeds, and, to be able to use it from all my computers, I set it up on a server with ssh enabled. When I log in this server with ssh, then launch newsbeuter, everything works fine. But when I invoke it that way : `ssh [ip] newsbeuter`, newsbeuter fails with 'Error opening terminal : unknown'. When I explicitly export $TERM[1], newsbeuter is able to launch, but it doesn't detect the terminal size and can't handle keys. So I'll be glad if you know how to fix that matter. Thanks in advance. In a totally unrelated matter, do you know how to make a remote program launch local scripts through ssh ? [1] : The command used is : `ssh [ip] 'export TERM=rxvt-unicode-256color && newsbeuter'`
On 26/07/14 04:09 PM, luc.linux@mailoo.org wrote:
Hello everyone.
I am using newsbeuter to handle my rss feeds, and, to be able to use it from all my computers, I set it up on a server with ssh enabled. When I log in this server with ssh, then launch newsbeuter, everything works fine. But when I invoke it that way : `ssh [ip] newsbeuter`, newsbeuter fails with 'Error opening terminal : unknown'.
When I explicitly export $TERM[1], newsbeuter is able to launch, but it doesn't detect the terminal size and can't handle keys.
So I'll be glad if you know how to fix that matter. Thanks in advance.
In a totally unrelated matter, do you know how to make a remote program launch local scripts through ssh ?
[1] : The command used is : `ssh [ip] 'export TERM=rxvt-unicode-256color && newsbeuter'`
You need the terminal's terminfo on the server. If you don't have root access there you can put it in your home directory.
On Sat, Jul 26, 2014 at 04:28:58PM -0400, Daniel Micay wrote:
You need the terminal's terminfo on the server. If you don't have root access there you can put it in your home directory. I already put it, without it I couldn't launch any ncurses program, no matter how I tried.
On Sat, Jul 26, 2014, at 10:09 PM, luc.linux@mailoo.org wrote:
But when I invoke it that way : `ssh [ip] newsbeuter`, newsbeuter fails with 'Error opening terminal : unknown'.
Pass the -t switch to ssh to make it open an pty to run the command.
On Sat, Jul 26, 2014 at 10:31:14PM +0200, Mikael Eriksson wrote:
Pass the -t switch to ssh to make it open an pty to run the command. It works ! Thanks a lot.
On Sat, Jul 26, 2014 at 10:31:14PM +0200, Mikael Eriksson wrote:
Pass the -t switch to ssh to make it open an pty to run the command. It fixed the ncurses problem, but I noticed that now, the stderr of the remote command is on the local stdout, preventing me to redirect somewhere else (on ncurses programs, I usually use stderr to log informations). Does anyone know how to fix that ?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2014-07-26 22:09, luc.linux@mailoo.org wrote:
In a totally unrelated matter, do you know how to make a remote program launch local scripts through ssh ?
You may use ssh -R to open a remote socket forwarding packets to your host and then send commands through it: ssh my.server.com -t -R 7777:localhost:7777 -- ... Here is how I did it, with newsbeuter in a tmux: http://tim.siosm.fr/blog/2014/02/16/first-rust-prog-and-rss-reader-update/ - -- Timothée Ravier -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCgAGBQJT12gtAAoJENsngY94aI+Dz8cIAKNQImyDaw3fVZybyacro67r jqEhql4jZVoe6fzKH1JotZQT6x5eeqqHFbybez287QmRlsITuvHRNknjJMKCzHNp 1wvn3wxLoOP8Mz2ip9Rlyb13LKaCWX4IvQc7nZvlneOikIJcAhtkrRlRWXoTns4x /HzFywjehYhiB1nz49UCksN9FGQo7+fJhmmzvHZ0KAG0+zR2pfDxxyuiQU0OGwZ4 y0yy2j2PVzhD1Bm/QZsX/m/icdm1voVgfc18iOYwMNIA+co37a7UeJxlN9jBOExo VmmQb5VH+nZ3feQCWdoHJvQAg/Z6O30Z8GYj/ueg4ZrEe3CAQahC2fbHyZ05+aQ= =fJcy -----END PGP SIGNATURE-----
You may use ssh -R to open a remote socket forwarding packets to your host and then send commands through it:
ssh my.server.com -t -R 7777:localhost:7777 -- ... I tried this, but I can't get the port forwarding to work. Testing it using netcat, I can get the local port forwarding to work, but netcat exits without printing anything (even in verbose mode) with the remote
On Tue, Jul 29, 2014 at 11:23:57AM +0200, Timothée Ravier wrote: port forwarding enabled. Do you know where the error can be ?
Here is how I did it, with newsbeuter in a tmux: http://tim.siosm.fr/blog/2014/02/16/first-rust-prog-and-rss-reader-update/ This is a good link, that's exactly what I want to do.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2014-07-29 20:26, luc.linux@mailoo.org wrote:
You may use ssh -R to open a remote socket forwarding packets to your host and then send commands through it:
ssh my.server.com -t -R 7777:localhost:7777 -- ... I tried this, but I can't get the port forwarding to work. Testing it using netcat, I can get the local port forwarding to work, but netcat exits without printing anything (even in verbose mode) with
On Tue, Jul 29, 2014 at 11:23:57AM +0200, Timothée Ravier wrote: the remote port forwarding enabled. Do you know where the error can be ?
I'm not sure I understand what's your issue here. This command will only forward any packets sent to localhost:7777 on the server to port 7777 on the client. You still need a program listening on port 7777 on the client (either sshd, telnet, my sample program...).
Here is how I did it, with newsbeuter in a tmux: http://tim.siosm.fr/blog/2014/02/16/first-rust-prog-and-rss-reader-update/
This is a good link, that's exactly what I want to do.
:) - -- Timothée Ravier -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCgAGBQJT2DTwAAoJENsngY94aI+DvycIAJwCit5T2y8H2rqdpS5GmLag NI14nJgy/RAUJWXm8CHmqEKtrNcAJLfDjWuKaUpD3yUGK+lSxyqoPg59mFneCAm8 82xNZCjejt2uMyQ1E6+QUC0Md5ech4x9Flgw7DTNvM4skEv55rsBq2uzEItWPfK6 4rBYu3ezYUohIYCE+59GxE/b7ZaviknCPjeW+c4GCikgPL3ux9+bQRk7jgsQ6H21 icn4ZONiCwN1WngdlPxC0jkRYDIxfRl8gBag+913tD0YzN/HUTEv0pR8eFCs79WM P0iZosKyaWHtVS05jeG3UU7vNEs/jkGGQvhuuesjix8U01FOktk88suX44lmefE= =muZU -----END PGP SIGNATURE-----
I'm not sure I understand what's your issue here. This command will only forward any packets sent to localhost:7777 on the server to port 7777 on the client. You still need a program listening on port 7777 on the client (either sshd, telnet, my sample program...). Sorry, I wasn't clear enough : I open the connection with "ssh [ip] -R 7777:localhost:7777". Once this is done, I launch "netcat -l -p 7777" on another terminal and "netcat localhost 7777" on
On Wed, Jul 30, 2014 at 01:57:37AM +0200, Timothée Ravier wrote: the server. Normally, netcat on the server should read its stdin and send it to localhost:7777, which is forwarded to my local computer, so I should see it on the netcat listening. But the netcat on the server simply exits without any error message, even in verbose mode. I don't know where the error can be. It worked when I tried local port forwarding, with the netcat listening on the server and sending messages from my computer, but that's not what I need. Maybe it is a firewall issue ? I don't know much in networks and I don't know how to debug that.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 2014-07-30 09:21, luc.linux@mailoo.org wrote:
Sorry, I wasn't clear enough : I open the connection with "ssh [ip] -R 7777:localhost:7777". Once this is done, I launch "netcat -l -p 7777" on another terminal and "netcat localhost 7777" on the server. Normally, netcat on the server should read its stdin and send it to localhost:7777, which is forwarded to my local computer, so I should see it on the netcat listening. But the netcat on the server simply exits without any error message, even in verbose mode.
I don't know where the error can be. It worked when I tried local port forwarding, with the netcat listening on the server and sending messages from my computer, but that's not what I need. Maybe it is a firewall issue ? I don't know much in networks and I don't know how to debug that.
The steps you described here work for me. I don't think that this is firewall issue. This looks like an ssh issue. Try running it with: ssh -vvv ... - -- Timothée Ravier -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCgAGBQJT2KzoAAoJENsngY94aI+DWCEH/jg+wK9VsBEFrXzLG1zyMEOa s9Lj0fVfLhTqlqhV8W72hYJDiycYVbNUDUIkf6/9dYHjM0hZnfL/lWPdZHQM78XB mLLZYmjozfkDZKpKgzDiOvcfO9JBGbZ7EaMAgjF4JfHVojLZtatEDxLWDUunLA9Z lCvnSguX/PE2y9bgnY5VrhsxAmwvVeNKMatH6cgx5020fklRjEpSAb1H1SI1bJB2 YzKvlbS0YMCYj7wIa1KFlESxUaubS9VbYlj/OWIogwoMmkoc2svT5U7J7s1tAbLL 8uxHkUeKgY3ek5xKij/BdQYe08R1P9VWXAMUL+7wYgM9UyImAmXmgsd+Jvr+t5c= =odnO -----END PGP SIGNATURE-----
participants (4)
-
Daniel Micay
-
luc.linux@mailoo.org
-
Mikael Eriksson
-
Timothée Ravier