tmux – Will session kill if not detached

The question I know is basic, but could not find an exact matching question in community.
The standard process of using tmux is – create a session, run command within and then detach the session. So existing ssh terminal will not kill our process.

My question is, if tmux session is created and a long command is running within it. But before detaching, if ssh session terminates, then will this tmux session persist or it will be killed too?

Is ‘detached HEAD’ state good

I previously asked the question, how do I ensure I am actually pulling a different release and I was informed that I shouldn’t be creating a new branch (with the -b flag). Instead of doing so, just checkout the branch from origin like so:

git checkout origin/release/3.5.1 

Well, I did that and I got this lengthy response:

git checkout origin/release/3.6.2 Note: checking out 'origin/release/3.6.2'.  You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.  If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:    git checkout -b <new-branch-name>  HEAD is now at a0bc3953 Merge pull request #473 in ENGA/ from master to release/3.6.2 

According to this answer: Local commits in detached HEAD state

I should have just done git checkout -b <new-branch>, and this will create a branch pointer to the currently checked out commit and move my HEAD to this.

I don’t doubt the answer I was given previously and as a result I then ran this command:

git checkout --track origin/release/3.6.2 Branch 'release/3.6.2' set up to track remote branch 'release/3.6.2' from 'origin'. Switched to a new branch 'release/3.6.2' 

Does the above look good? How can I be sure I have the branch from the remote repo? Not an experimental branch, not a local empty branch, but the original branch of release/3.6.2 off the Bitbucket repo?

How do I create a detached plain text signature?

If I use gpg --detach-sig file, then I get a small file.sig, but it is not plain text, so this is not useful if you wish to send the signature in a plain text format.

If I use gpg --clearsign file, then I get file.asc which contains the whole file plus a plain text signature at the end of the file. For viewing the signature, this is not easy if the payload is something other than text, since you can’t open the file as plain text if your text editor can’t handle the raw payload data. And I would prefer the payload and signature be separate files.

If I use both of the arguments at once, gpg --detach-sig --clearsign file, it behaves identically to only --clearsign, basically ignoring --detach-sig.

How can I create a detached plain text GPG signature?

Verify PKCS#7 (CMS) detached signature with timestamp with OpenSSL

I have a PKCS#7 (i.e., CMS) detached signature of a file that is signed by my signing certificate and then timestamp signed by a TSA that is all generated by an application we wrote. I would like to give a third party the original data file and the detached signature file and have the third party verify the signature and trusted timestamp with readily available tools. Assuming the third party already has the CA certs that make up the chains for my signing certificate and the TSA, what OpenSSL commands should I tell the third party to run do the following:

  1. Validate the signature against the file and verify that the signing certificate chains up to a trusted root (can ignore revocation)
  2. Verify that the CMS data is timestamped via a trusted TSA
  3. Extract the TSA-signed timestamp from the CMS and print it in a human readable format

I am pretty sure #1 can be accomplished by executing the following command:

openssl cms -verify -in cms_file -content data_file -inform DER -CApath path_to_ca_certs

but I would like verification on that. Also, what commands should be used to perform #2 and #3?

jQuery detached element gets duplicated when reattached?

I have this code for removing (detaching) a submenu from a menu item and attach it after the header (don’t ask; it’s WP and WPML, yeah the general mess) for better control of styling etc.:

    $  ('li.wpml-ls-current-language > a').on('click', function ( e ) {         e.preventDefault();          let retachTo = $  ( this ).parent();          let sub_menu = $  ('ul.sub-menu');          if ( !':visible') ) {             sub_menu.addClass('show').detach();             $  ('header').after( sub_menu );         } else {             sub_menu.removeClass('show').detach();             retachTo.append( sub_menu );         }     }) 

Now, the submenu gets duplicated exponentially everytime I click the menu item. I don’t know if this is due to exhaustion or the like, but I can’t seem to figure out WHERE the duplicate comes from.

Can anyone spot what it is that I’m missing completely?

How to kill a process running in detached tmux on a server?

I am logging in to a processing farm. There are multiple machines I can log in through(multiple physical machines acting as a single server unit I am logging to through ssh). If I start a tmux session, detach and then log out and log in, I can not attach to the session, because I am logged in through a different machine. My question is, how do I find out what machine am I logged in through and what can I do to connect or at least kill the tmux session?