[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
On Tue, Jul 29, 2014 at 11:23:57AM +0200, Timothée Ravier 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 the remote 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:
On Tue, Jul 29, 2014 at 11:23:57AM +0200, Timothée Ravier 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 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
On Wed, Jul 30, 2014 at 01:57:37AM +0200, Timothée Ravier wrote:
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 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
participants (4)
-
Daniel Micay
-
luc.linux@mailoo.org
-
Mikael Eriksson
-
Timothée Ravier