Re: ssh/screen question - thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Followup.

So far lots of tests/no success:

To refresh:
 The goal, to be able to reattach to a remote screen session, and to
run a cmd in the remote screen session, and have the cmd return to the
calling term

Research/testing I should be able to create a remote screen session,
and then reattach to it, to run the cmd.


//--this works generates the screen session 'testname' on the remote instance
ssh crawl_user@192.81.214.49 "screen -d -m -S 'testname' "


/*
  however, can't seem to figure out how/what to use in order to run the test
  "ls -al" or an echo cmd via the remote screen session.
  -various SO articles imply one of the following should work..
  but no luck!
*/
--which of these??

ssh crawl_user@192.81.214.49 'screen -m -d -r "testname" "ls" '
ssh crawl_user@192.81.214.49 'screen  -r "testname" "ls" '

ssh -t crawl_user@192.81.214.49 'screen  -r "testname" "nohup ls &" '
--ssh -f crawl_user@192.81.214.49 'screen  -r "testname" "nohup ls &" '
ssh -t crawl_user@192.81.214.49 'screen  -r "testname" "nohup ls &"  &'

ssh -t crawl_user@192.81.214.49 'screen  -r "testname" "nohup ls >
aa.tmp  2>&1 > /dev/null " '
ssh -t crawl_user@192.81.214.49 'screen  -r "testname" -X echo "hhh" > aa.tmp '
ssh -t crawl_user@192.81.214.49 'screen  -r "testname" -X ls > aa.tmp '





On Sat, Nov 12, 2016 at 2:45 PM, bruce <badouglas@xxxxxxxxx> wrote:
> Hey Ladies/Gents.
>
> This follows the other thread i posted over the last few weeks on
> devOPS stuff for managing groups of remote droplets/vms.
>
> My approach for now to implement clusterSSH as well as screen to be
> able to auto gen the remote droplets, and to be able to ssh into them
> to view status, as well as to track progress, and run remote processes
> with the screen env.
>
> I'm currently testing the screen function to get more familiar with
> it, and running into an issue.
>
> I generate a basic test screen session, with a name. This session is there.
>   screen -ls
> shows the session and i can pop another term, and ssh into the box,,
> and attach to the screen session
>   screen -r 'testname' gets into the session.
>
> However, when I attempt to do a simple test, to run a remote cmd
> within the remote ssh/screen env, I run into issues. I get an error in
> that the ssh/screen/cmd needs a terminal
>
>        -----Must be connected to a terminal.
>
> Ive tested/tried a few different iterations of the ssh/screen/ls to
> try to get this to work.
>
> //--this actually generates the screen sesstion on the remote box, no issues
> ssh crawl_user@192.81.214.49 "screen -d -m -S 'testname' "
>
> //--which of these (or something else) to remotely run ls in the
> ssh/screen session??
> --which of these??
> ssh crawl_user@192.81.214.49 'screen -m -d -r "testname" "ls" '
> ssh crawl_user@192.81.214.49 'screen  -r "testname" "ls" '
>
> ssh -t crawl_user@192.81.214.49 'screen  -r "testname" "nhup ls &" '
>   --- this almost seems to work, but the process hangs, leaving the
> user in the remote term, in other words, it doesn't run, and return to
> the calling term
>
> I've been looking at the net/goog/SO/etc.. but no real insight yet..
>
> Thoughts/comments appreciated...
>
> Thanks
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux