Earlier quoted context omitted.
If you must allow SSH root access, in 2014, you are doing something horribly wrong, and this will come back to bite you.
You are wrong, again. Passwordless root SSH is perfectly fine, which is why it is enabled by default. By people who have thought a little longer and harder about all this than you. (Sorry for the tone. Maladvice like yours on public forums is demonstrably harmful.)
SSH Kung Fu
91–100 of 133 posts
Re: SSH Kung Fu
#92Earlier quoted context omitted.
Why not use the more common "no"?
Because then root login would be disabled entirely. With "without-password" SSH-key based login is still possible (and no, that's not much of a security risk).
While one can't peek from behind your shoulder, if they got a keylogger on your machine, they could steal ~/.ssh/id_* files as well (and sniff their security passphrases too).
Re: SSH Kung Fu
#93 laptop - user (userid: me)
F - firewall (userid: me)
A - machine 1 in colo (userid: colo)
B - machine 2 in colo (userid: colo, machine I want to access)
C - machine 2 in colo (userid: colo)
.
.
100s of machines.
Trust (ssh password less login) is setup between me@laptop and me@F, and me@laptop and colo@A, and between all colo machine (A,B,C..). So colo@A can ssh colo@B w/o password.I am able to log into colo@A via F w/o password as I copied the ssh key there manually. (path me@laptop -> colo@F -> colo@A)
QUESTION: Is it possible to ssh to other machines (B,C..) via A while assuming full identity of colo@A? (Path would be me@laptop -> colo@F -> colo@A -> colo@B/C/..) With my current config when I try to ssh to B it knows request is originating from 'laptop' and still asks me for password.
Re: SSH Kung Fu
#94Re: SSH Kung Fu
#95Earlier quoted context omitted.
Because then root login would be disabled entirely. With "without-password" SSH-key based login is still possible (and no, that's not much of a security risk).
Is it really much harder to leak a private key than a passphrase? (It's obviously harder, but not sure whenever a difference is significant.) While one can't peek from behind your shoulder, if they got a keylogger on your machine, they could steal ~/.ssh/id_* files as well (and sniff their security passphrases too).
Re: SSH Kung Fu
#96A trick I learned recently: create .ssh/config File format: as many of the following blocks as you like Host $ALIAS You can now ssh to that server as that user by doing "ssh $ALIAS" on the command line, without needing to specify the port or user with the usual command line arguments, or necessarily spell out the entire host name.
A favorite .ssh/config feature of mine is pattern matching on hostnames with "?" and "*". So you can say something like: Host bos-?? HostName %h.mydomain.com IdentityFile ~/.ssh/my-boston-key Host nyc-?? HostName %h.mydomain2.com IdentityFile ~/.ssh/my-nyc-key and log in with e.g. "ssh bos-14".
Host *.amazonaws.com
User ec2-user
IdentityFile ...
And then it is just ssh ec2-X-X-X-X.compute-1.amazonaws.comRe: SSH Kung Fu
#97Earlier quoted context omitted.
There are many cases where you do not want, or cannot have a password protected ssh trust. For example, say you have a central nagios host monitoring a network, that nagios host needs to connect to remote machines to run interesting monitoring scripts (disk % full, raid controller query, mpio checks, etc), in these cases you do not want to have a password blocking the ssh trust. You will also find this type of thing…
No, in that case, you limit the commands that nagios is allowed to executed using this specific, passphrase-less key. In this case you would limit this ssh-key to only be able to execute the nagios monitoring scripts. Nothing else. You do this in ~/.ssh/config on the remote machine.
For anyone interested here's an SO question with an example: http://stackoverflow.com/questions/402615/how-to-restrict-ss...
Re: SSH Kung Fu
#98Earlier quoted context omitted.
Would you like to clarify how, from a security standpoint, the string "root" is worse than another user? Allowing root login can be a user-management headache in multi-user environments, but strong SSH security can exist for root just the same as for any other user.
Because a potential intruder is more probable to try "root" than "akerl_35" to get access. It's no big deal to login as any other user and then use sudo (if needed) or even su
Re: SSH Kung Fu
#99I have a setup similar to this: laptop - user (userid: me) F - firewall (userid: me) A - machine 1 in colo (userid: colo) B - machine 2 in colo (userid: colo, machine I want to access) C - machine 2 in colo (userid: colo) . . 100s of machines. Trust (ssh password less login) is setup between me@laptop and me@F, and me@laptop and colo@A, and between all colo machine (A,B,C..). So colo@A can ssh colo@B w/o password. I…
ProxyCommand ssh ...
Re: SSH Kung Fu
#100Earlier quoted context omitted.
I have had this problem, although fairly rarely. I have the following in my ~/.ssh/config: ControlPath /tmp/ssh_mux_%h_%p_%r This sets the path of the control file used to share the connection. If it ever hangs, I can just delete the file. But in practice I found this doesn't happen often and I appreciate the speed boost I get from connection sharing.
one minor annoyance is that there's a max limit to the ControlPath string (seemingly due to there being a max path length for Unix Sockets) which I've occasionally hit when connecting to hosts with very long hostnames (AWS default hostnames can sometimes hit it, IIRC). Also note that the docs recommend against using publicly accessible dirs such as /tmp/ for storing your mux sockets. I'm not sure of the exact threat…