Community discussions

MikroTik App
 
pier4r
just joined
Topic Author
Posts: 9
Joined: Sun Jul 30, 2017 3:50 pm

Keep terminal session alive after disconnecting winbox

Sat Aug 12, 2017 10:57 pm

Like the title says. On linux I normally either use "screen" or I launch a command in background, with &. How do I do it with mikrotik? Like to keep open an ssh connection.
 
User avatar
macsrwe
Forum Guru
Forum Guru
Posts: 1011
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: Keep terminal session alive after disconnecting winbox

Sun Aug 13, 2017 3:14 am

Whatever command you want to be persistent, instead of typing it into the terminal, type it into a script and then run the script. It will keep running even after you disconnect winbox.


Sent from my iPhone using Tapatalk
 
pier4r
just joined
Topic Author
Posts: 9
Joined: Sun Jul 30, 2017 3:50 pm

Re: Keep terminal session alive after disconnecting winbox

Sun Aug 13, 2017 11:02 am

I will try, thanks!

edit: it does not seem possible to handle interactive sessions properly via scripts. viewtopic.php?t=71262

I'll have to use fastkeys and other systems to do that.
 
User avatar
macsrwe
Forum Guru
Forum Guru
Posts: 1011
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: Keep terminal session alive after disconnecting winbox

Sun Aug 13, 2017 11:14 pm

Yeah, OK... if the command you are running has even the potential of ever reading stuff from user-input, it won't be allowed.

See this posting for my own bugaboo related to this topic.