Posts

Adopción de ap unifi cuando el comando set-inform no aparece en el ap por ssh - docker controller

Supongamos que queremos migrar un ap de un controller a otra instalación nueva de un controller. Usamos el comando set-inform http//<controller ip>:8080/inform. Particularmente estoy migrando el controlador a un contenedor docker. No se si tiene que ver o no. Hay veces que el comando set-inform no aparece en bash despues de conectarnos por ssh al ap con ubnt@ubnt. Encontré este comando en un foro de home assistant que literalmente me solucionó el problema. ssh admin@<your_unifi_ap_ip> "/usr/bin/mca-cli-op set-inform http://<your_unifi_controller_ip>/inform ; exit" l ink ¡Gracias  JeremiahCornelius !

Copying files from remote to localhost

Just for Linux Remote host to localhost: username@remotehost.com:file /local_directory/  From localhost to Remote host scp file username@remotehost.com:/remote_directory/ 

Prevent ssh timeouts

Locally add the following to ~/.ssh/config ServerAliveInterval 120 # null packet every 120 seconds On the server side add the following: ClientAliveInterval 120 # null packet every 120 seconds ClientAliveCountMax 720 # 24hs Done!

fail2ban unban ip

To search all the ips that were banned we enter interactive mode: $ fail2ban-client -i Then we check a jail status, for example sshd : > status sshd the output: Status for the jail: sshd |- Filter |  |- Currently failed: 0 |  |- Total failed: 27 |  `- File list: /var/log/auth.log `- Actions    |- Currently banned: 37    |- Total banned: 38    `- Banned IP list: <a big list of banned ips> So, if we want to unban a particular ip address, let's say X Then, we execute: > set ssh unbanip (within interactive mode) Lastly, if you want to execute it directly from command line: $ fail2ban-client get <JAIL> actionunban <IP-ADDRESS> That's all.

Cleaning Bash History...

Just run: cat / dev / null > ~/. bash_history && history - c && exit

The document "mydoc" could not be saved. You don’t have permission

Just run the following command: $ chmod -R -N mydoc

*** System Restart Required *** - Ubuntu

Which packages need a system reboot? Just check /var/run/reboot-required.pkgs