Tag Info

New answers tagged

2

Turns out my router was set up to forward some high ports to the internal SSH port - so basically the problem was caused by some ancient configuration leftovers. How stupid.


0

You can set up your host system to run ARM binaries using the QEMU emulator. This is done by registering an userspace-application for a specific executable format to the kernel's binfmt-functionality. Since the setup-procedure is quite lengthy, let me just post some links to howtos: https://wiki.gentoo.org/wiki/Crossdev_qemu-static-user-chroot ...


0

I have the same problem on a raspberry, my quick and dirty solution was update-rc.d disable abd I put service ssh start in my rc.local. maybe in your case a service ssh enable will help,...


0

I figured it out. As I posted in my other post: Is there a specific SSH boot log? In my auth.log file, it wasn't binding to the IP address I put in for the ListenAddress parameter in /etc/ssh/sshd_config. After I changed it back to 0.0.0.0, it starts up now. Don't quite understand, I thought I could put the IP address of my computer? And I don't understand ...


1

I am reading this tutorial, and trying to create a new user with root privileges and then block root access via ssh in a CentOS 7 server. The problem is that the new user is blocked from doing root actions like nano /etc/sudoers. Also, I seem unable to remove the block of root login. So my pre-existing open root session is the only access I have to root ...


0

Assuming you have installed openssh-server , check for sshd startup symbolic links at /etc/rc{2,3,4,5} directories , run ls -l /etc/rc?.d/*ssh if no startup links there , create them by running sudo update-rc.d ssh defaults and reboot. If problem not solved yet, you may try it by placing service ssh start (before the "exit 0" line) at /etc/rc.local file ...


1

For those of you using chef, adding MaxSessions 1 to /etc/ssh/sshd_config will break knife ssh as it seems to rely on multiplexing. If anyone has a workaround for this, I'd love to hear it!!! (adding MaxSessions 1 and NOT breaking chef, that is...). NOTE: For above ^^^ You'll see errors like: ERROR: IOError: closed stream ERROR: Net::SSH::Disconnect: ...


4

As explained in man ssh: -t         Force pseudo-tty allocation. This can be used to execute arbi‐           trary screen-based programs on a remote machine, which can be           very ...


0

Did you try the man pages? Both cgconfig.conf(5) and cgrules.conf(5) have nice examples, it shouldn't be difficult modifying those to match your needs. You will probably want to start from something like (be warned I have not tested it): In /etc/cgrules.conf: root:sshd * sshdcg/ * * default/ and ...


4

You shouldn't believe everything you read on the Internet. :) There is no security problem with enabling TCPKeepAlive. There never was any such problem. The meaning of the warning in the sshd_config(5) manual is that you shouldn't rely on TCPKeepAlive alone, since an attacker can spoof it to fool the server into thinking a connection is still alive when it ...


-1

While sed is a possibility here, it's easier to make this robust in awk. The following script skips lines starting at Match User FOO (or any variation in case and whitespace) and stops skipping at any other Match User line, and prints all non-skipped lines. awk ' tolower($1)=="match" && tolower($2) == "user" {skip = $3 == "foo"} !skip ' In ...


0

sed '/^Match User FOO$/,/^ *F.*-sftp$/c\ The whole of the above line range is \ replaced with this one block of text.\ Use an empty "c"hange command or a \ "d"elete command to replace it with \ nothing at all.' <infile >outfile It looks like you can rely on indents, by the way. So probably you can do: sed '$!N;/^Match User ...


4

Ok, we need some history here, back in the days that the primary way to access a UNIX box was a Terminal and a serial line there were four programs involved in logging in. They were init, getty, login, and a shell. init started getty and kept it running. getty opened a serial port (and maybe did modem specific stuff), and then displayed the login prompt and ...


3

Assuming all your Match blocks are at the end of the sshd_config file. If your blocks are separated by empty lines, e.g.: Match User FOO1 PasswordAuthentication no Match User FOO2 PasswordAuthentication yes Match User FOO ChrootDirectory /srv/www/FOO AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp then just ...


0

You can try this script using send and awk tools: matchedLine=$(awk '/Match User FOO1/{ print NR; exit }' $1) if [ "$matchedLine" = "" ];then echo "Match not found" exit 1; fi sed -e "$matchedLine,$(awk "BEGIN {print $matchedLine + 5 }";)d;" $1 This script takes the filename of the ssh config file as its first argument. It then searches the file for ...


-1

This can be done using sed by using the N command: sed -ri 'N;N;N;N;N;/^.+FOO\n.+/d' input.txt What N command does is that it reads/appends the next line into your pattern space, hence making multi-line regex possible using sed. For more, see this tutorial.



Top 50 recent answers are included