« first day (3355 days earlier)      last day (1607 days later) » 

7:28 AM
Hi everyone
 
7:54 AM
@astrosixer Hi there.
 
hello
can u help me with some bash commands?
 
@astrosixer Possibly, depending on what they are and what the issue is.
 
ok thnx..
I connected to the server using ssh details such as username and password. Is it okay once I done this and now I will use scp to copy my folder contents to the server? I googled, but the solution is like creating ssh connection by key/pair and then can do scp.
 
So you want to copy a directory to a remote server using scp. You don't have to first log into the server to do that. It should be enough with scp -r folderpath username@server:remotepath (where remotepath is where you want to put the directory) from the local machine.
 
that's ok. But while it wont ask for password?
 
8:05 AM
Ah, you don't want to give a password? In that case you will have to set up key-based authentication with the server. This involves creating a public and private SSH key with ssh-keygen locally and copying the public key to ~/.ssh/authorized_keys on the server. I'll see if I can find a good question/answer on the site for you to read.
@astrosixer Here, for example: unix.stackexchange.com/questions/23291/…
 
I afraid I can do that because already there is ssh key generated but for different server. Here, is it possible to set up another ssh key/pair without effecting the other one?
 
If you already have a key, there is nothing stopping you (apart from if you have some sort of local rules about it) from using the same key pair for this server that we are interested in now.
 
But this one right now I am trying to connect doesn't have any ssh key/pair set up.
 
For example, I have a single keypair on my main machine. I have copied the public key to all other machines that I need to log in to from this machine.
@astrosixer But do you have a password to log into it?
 
yes
 
8:13 AM
So, log into it and add your public SSH key to the ~/.ssh/authorized_keys file on the server.
 
8:23 AM
(you don't have to create a new keypair)
 
So what if I would like to use different private/public key pair for each of the remote servers am connecting to via ssh? Is it possible to do so? Means can I store multiple ssh private keys in my local system that each key represents different servers?
 
@astrosixer yes, it’s possible, but it gets very annoying very quickly IME
The security model really is that one private key identifies one account on one client machine, and is used as-is with all remote systems you want that account to connect to.
 
@astrosixer As Stephen said. Having to keep track of multiple keys is annoying, and in the long run could also be a security issue (once you start forgetting what keys have been copied to where).
 
Yeah, you guys are right, because of the same security issue I thought of doing it seperate
but it seems now of more security issues are there
One final thing, I would like to know
Can I directly edit files once we connected to the remote server via ssh?
By that I mean using nano editor , as we do in terminal?
Is it safe?
 
@astrosixer Yes, I see no reason why you should not be able to (assuming you have permissions to edit the files you want to edit, as ordinarily is the case).
@astrosixer It is not more or less safe to use nano over SSH than it is to use it locally, unless you have reasons to believe that the admins of the remote system are malicious in some way (in which case you shold probably not be on that system at all).
So, it depends on what you mean by "safe".
 
8:44 AM
Ultimately, nothing is intrinsically safe, it’s all a matter of trust, so it all boils down to people.
(Including the above comment of course.)
 
 
2 hours later…
10:39 AM
Thanks to both of you guys @Kusalananda and @StephenKitt
You guys gave me a pretty much insight. It was very much helpful to me as I was doing for the first time.
 
 
3 hours later…
1:23 PM
Ok, I'm going to change my legal name to "extended filename globbing pattern modifier".
(not really)
 
1:35 PM
Hmm... We don't have a "comments" tag?
 
@Kusalananda indeed; and I don't see any Meta.UL discussion on it, either. Maybe people assumed it was part of ??
 
 
1 hour later…
2:53 PM
@JeffSchaller That's the thing though, >this< is about comments in an interactive shell, not a shell script.
But I don't think it's that important a subject to warrant its own tag. At least not at the moment.
 
3:14 PM
@Kusalananda probably not; I don't recall seeing enough questions that focused on comments, either.
 
 
2 hours later…
5:21 PM
@Kusalananda Comments? As in the thing after the # (etc.) character?
 
@derobert Exactly.
This may only ever be an issue in the zsh shell though, when running in interactive mode.
 
Doesn't strike me as a particularly useful tag. Seems, err, way too specific.
Maybe I'm missing some context though, since I still haven't checked out zsh
 
@derobert Yeah, I know. I don't know why, but I found it surprising that I couldn't tag a question with a "comment" tag.
1
Q: Allowing comments in interactive zsh commands

ToothrotIt might be useful to allow comments in zsh commands written on the command line, as in bash, but % echo test # test zsh: bad pattern: # Any way to get the same behaviour as in the bash shell?

Context ^
 
I'm surprised you couldn't create the tag. But I'd guess there is no expert on comments (it's too generic in addition to being too specific...), or anyone who'd want to follow the tag. It could be useful in searching, I guess, e.g., for [zsh] [comments], but...
 
@derobert Oh, I didn't try to create the tag. I just couldn't find a pre-existing tag.
I wouldn't create a tag without a prior discussion, and this discussion is basically telling me that we don't want a "comment" tag.
 
5:28 PM
I mean, I hope there isn't an if tag, or any other simple bit of shell syntax.
 
There's , and
... and ;-)
 
Huh, wow, and they get a fair bit of use, too.
 
(which gets usef for question about loops every now and again)
 
Pretty sure for for/while/etc. is a mistake :-P
So maybe you should have . Though I'd maybe go with to be clearer.
 
@derobert Yeah, I re-tagged a bunch of them a while ago.
 
5:34 PM
Hmmm, I vaguely recall somewhere telling you how many people are watching a tag. Or maybe I just made that up.
 
@derobert I honestly don't think we need such a tag actually.
@derobert Yeah, wherever was that?
 
I suspect the only other question anyone has ever had about comments is why this doesn't work:
echo hello#comment here
 
@derobert In some contexts, if you mouse-over a tag, it will tell you how many "watchers" it has in a pop-up.
 
1
Q: How do I know (other than hovering over it) how many people are watching a tag?

Victor ValenteFor an example, if I want to get a list of the 500 most watched tags, it would be impractical to check out the tag popup for each one of them.

... and at least back in Feb, that was apparently the only way
 
I watch all the tags I have silver badges for, then I have two custom searches, one for my gold badge tags, and one for the siver badge tags (minus the gold ones). The searches are for unanswered questions.
 
5:40 PM
So for and case (unsurprisingly) have no watchers.
 
@Jesse_b is the top user on in the last 30 days!
And I'm the 3rd over all it seems.
Well, I have nothing against loops.
Exactly the same stats for for whatever reason.
But who is "Jacob Minshall"? They're to top user overall... interesting.
That's pretty good going with only 15 answers and no questions.
 
100
A: What does "esac" mean at the end of a bash case statement? Is it required?

Jacob MinshallLike fi for if and done for for, esac is the required way to end a case statement. esac is case spelled backward, rather like fi is if spelled backward. I don't know why the token ending a for block is not rof.

 
Oh, I see. He has two answers with 100 and 175 upvotes.
 
Yeah, I guess that must have gone hot network questions at some point, so got an absurd upvote total. Sort of like my cows question :-/
 
@derobert Seems likely, yes.
 
5:47 PM
Appears it was everyone's favorite twitter bot at first (twitter.com/StackUnix/status/689589744968286208) and then slow growth over the years
 
@derobert Actually no, that question has never been a hot network question. Yes, it mest have been the tweet.
Although the tweet itself has no likes or retweets.
I suppose searching for "esac" would find the title easily. Writing a sexy title is key if you want views.
 
Indeed. Arqade used to be (maybe still is?) the expert at great question titles
 
6:50 PM
@Kusalananda I wonder if you say that based on not seeing a record in the question's timeline? That particular record was only added to recently-asked questions
 
@JeffSchaller Ah. A bit of history, so to speak, that I didn't know about. Thanks.
 
@Kusalananda certainly! Just didn't want you rewriting history :) meta.stackexchange.com/questions/325060/… happened around March 2019 apparently
 
BTW — I'm experimenting with a program to wipe disks. Trying to do a single-pass with pseudo-random data, then ideally would like to verify it. Or at least be able to.
First attempt, use dmcrypt to use AES/XTS, then just write 0s to it. Disk will see psuedo-random data due to encryption.
Problem: turns out directly writing a random steam is ≈25% faster. Mainly it seems due to using O_DIRECT with 1MB blocks; upping the block size to 512MB(!) gets all the speed back (and probably dropping O_DIRECT, but that'd have other issues, like not really being sure which block failed to write)
So I'd like to get a fast pseudo-random stream in my program (currently Perl)... Seems like a stream cipher like ChaCha20 or AES-CTR would provide the needed bytes, and Perl has OpenSSL modules...
But... taking a look at the OpenSSL docs... I understand why everyone rolls their own crypto.
 
8:03 PM
@JeffSchaller Oh, I remember that one.
 
@Kusalananda I can't promise I'll catch Meta.SE posts in recent times, but I happened to see & remember that one.
 
Yay! Someone who got their non-answer deleted because it was a question came back and actually asked the question properly! unix.stackexchange.com/questions/557562
I don't think that actually happens very often.
 
8:41 PM
Hurray for a new user climbing the StackExchange learning curve ... by reading! :)
 

« first day (3355 days earlier)      last day (1607 days later) »