Tuesday, 16 November 2021

Connect as root using WINSCP

How to connect as root using WINSCP

Refer: https://blog.jamesbayley.com/2014/01/28/how-to-connect-as-root-using-winscp/

In my previous post I noted that I had not succeeded in in connecting to a linux machine as root using WINSCP when using the bitnami virtual machine.

My development implementation works, so I have progressed to using the cloud hosted bitnami instance. This comes with public key access rather than password access. This actually make it easier to connect.

  1. Download your private key, if using bitnami use the cloud console, if using AWS use the AWS console. Store it with no spaces in the file name.
  2. Optionally put it into your Pageant keystore
  3. Verify that you can connect using PuTTY

You now have two choices, you may use the SFTP protocol or the SCP protocol. My experience shows that connecting with SCP is easier.

USE the SCP protocol (preferred)

  1. Test connecting with WINSCP using using the SCP protocol and the bitnami (low priviledge user) and your private key.
  2. On the Advanced tab of WINSCP specify the Shell to be
    i) sudo su-



Use the SFTP protocol

  1. Test connecting with WINSCP using the SFTP protocol using the bitnami (low priviledge user) and your private key.
  2. Find the location of the sftp server, you will enter this into WINSCP later
    [root@test /]# locate sftp-server




  1. On the Advanced tab of the WINSCP specify the sudo -s command to run the server as su. This works because you are using PKI and are not asked to provide a password when you sudo.
    i) sudo su -c /usr/libexec/openssh/sftp-server or sudo -s /usr/libexec/openssh/sftp-server





















Monday, 12 July 2021

Free Website Service + Free Software

Free Website Service:
Check if your email is in a data breach:
https://haveibeenpwned.com/

Picture Effects:

Face Swap Effects:

Erase Photo Background:

Vocal Isolation:
Song Finder (Chrome Extensions):

Black White Photo to Colour:

AI 图片动起来:
https://app.klingai.com/cn/

AI 图片动起来:
https://app.runwayml.com/login

AI 图片动起来:
https://lumalabs.ai/dream-machine

AI影片外国人说中文:
https://www.heygen.com/

AI音频Clone:
https://www.minimax.io/audio

 Free Software:
Monitor GPU temps:
HWMonitor or HWiNFO64

Image Editor:
https://www.gimp.org/

File Archiver:
https://www.7-zip.org


PotPlayer Multimedia Player
https://potplayer.daum.net/


Video Transcoder:
https://handbrake.fr/



Kill programs instantly with Ctrl+Alt+F4:
https://stefansundin.github.io/superf4/

OBS Studio (Screen Recording):
https://obsproject.com/

Captura (Screen Recording):
https://mathewsachin.github.io/Captura/

ShareX (Screen Recording):
https://getsharex.com/

ScreenRec (Screen Recording):
https://screenrec.com


Dism++ (WinSxS Cleanup):
https://www.chuyu.me/

Snipaste (Snip & Paste):
https://www.snipaste.com/

Document-editing:
https://www.onlyoffice.com/

Shotcut (Video Editing):
https://shotcut.org/


OpenShot Video Editor:
https://www.openshot.org/

HitFilm Express (Video Editor):
https://fxhome.com/product/hitfilm-express


VSDC Video Editor (Include screen recorder):
http://www.videosoftdev.com/

Kdenlive Video Editor:
https://kdenlive.org/

Password Manager:
https://bitwarden.com/

Kaspersky Security Cloud (Free Antivirus):
https://www.kaspersky.com/free-antivirus

Avast Antivirus:
https://www.avast.com/





Windscribe VPN:
https://windscribe.com/

Speedify VPN:
https://speedify.com/




Recuva (Recover deleted file):
https://www.ccleaner.com/recuva

BleachBit (Clean system):
https://www.bleachbit.org/


Forget Windows Password:
1) https://www.hirensbootcd.org/download/
2) Boot from USB, use NT Password Edit

Forget Excel Password:
1) John the Ripper: https://www.openwall.com/
2) unzip John the Ripper, copy the excel file into john-1.9.0-jumbo\run folder,
run: python office2john.py xxx.xlsx



3) hashcat: https://hashcat.net/hashcat/
4) unzip hashcat,
run: hashcat.exe -m 9600 -a 3 $office$*2013*xxx -o password.txt
















5) check password inside password.txt

Microsoft Free Apps:





2fast – Two Factor Authenticator Supporting TOTP
 
Fluent Screen Recorder
 
Visum Photo Viewer
 
NanaZip
 
Files App (File Manager)

Chrome Extensions:





Tampermonkey Userscript Manager:
https://www.tampermonkey.net/

Greasy Fork (User Scripts):
https://greasyfork.org/
懒人专用:
AC-baidu:

OS:
balenaEtcher (Create bootable USB drives):
https://www.balena.io/etcher/

Android-x86 (Android on PC):
https://www.android-x86.org

Bliss OS (Android on PC):
https://blissos.org/
Installation Note:
Do not re-format (NTFS)
Skip install boot loader GRUB
No install /system directory as read-write
16384MB disk image (16GB)

Grub2Win (Dual OS):
https://sourceforge.net/projects/grub2win/
Note:
AutoUpdate > Updated /GrubInst > rename GrubInst.7z > Unzip > run setup.bat
No (EFI Firmware) > EFI Partition Operations > Action (Refresh GNU Grub EFI Modules) > Apply Actions > Manage Boot Menu > Add A New Entry > Type (android), Title (Android), Select A New Android Kernel File (Android install directory\kernel) > OK > Apply

Android Apps:

Wednesday, 5 February 2020

CentOS 8

ip a / ip address     #show ip address
nmtui     #NetworkManager TUI
nmcli d     #NetworkManager device
 
yum install epel-release
yum update
yum install dnf
yum install vim
dnf install chrony

yum install iftop htop telnet tmux     #iftop -i eth0   #telnet only for test tcp port

yum install nc    #nc -z -v -u 192.168.10.12 161   #nc for test udp port

yum install traceroute
yum install nmap     #nmap -sU 192.168.10.12 to scan udp port
yum install iperf3
yum install bind-utils     #dig

yum install httpd
yum install mariadb-server
dnf install php php-opcache php-gd php-curl php-mysqlnd


#####################################################
Network interface configuration file:
[root@PacketFence-ZEN ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens160
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static     #or none/dhcp
DEFROUTE=yes     #yes: This interface is set as the default route for IPv4|IPv6 traffic.
IPV4_FAILURE_FATAL=no     #no: This interface is not disabled if configuration fails.
IPV6INIT=yes     #yes: Enable IPv6 on this interface.
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens160
UUID=27f5f975-99f0-444d-a2f0-2e0a039810d3
DEVICE=ens160
ONBOOT=yes     yes: This interface is activated at boot time.
HWADDR=08:00:29:5b:85:77
IPADDR=10.10.10.79
PREFIX=24
GATEWAY=10.10.10.1
DNS1=8.8.8.8
DNS2=8.8.4.4

[root@PacketFence-ZEN ~]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1              localhost localhost.localdomain localhost6 localhost6.localdomain6
1.2.3.4 www.google.com

[root@PacketFence-ZEN ~]# vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

[root@PacketFence-ZEN ~]# vim /etc/sysconfig/network  #This file specifies global network settings
GATEWAY=10.10.10.1

Restart Network Services:
systemctl restart NetworkManager
nmcli networking off; nmcli networking on

#####################################################

NTP:
dnf install chrony
systemctl enable chronyd
vim /etc/chrony.conf
    allow 192.168.0.0/16     #If want to set Chrony to act as an NTP server for a local network.
    Server 192.168.1.150     #if want to set Chrony to act as an NTP client.
systemctl restart chronyd
firewall-cmd --permanent --add-service=ntp
firewall-cmd --reload
chronyc sources     #Check for NTP server sources.

timedatectl   #Read clock, RTC(hardware clock)
timedatectl set-local-rtc 1   #change the hardware clock time standard to localtime
timedatectl set-local-rtc 0   #revert to the hardware clock being in UTC
timedatectl set-timezone Asia/Kuala_Lumpur
timedatectl set-ntp yes
timedatectl set-ntp on
yum install ntp
ntpq -p
hwclock
ntpdate pool.ntp.org
ntpdate -u pool.ntp.org
logfile /var/log/ntp.log   #If you logfile
ss -atun | grep 123   #check if ntpd daemon is listening on it’s port


#####################################################

TMUX:
[root@centos8 ~]# tmux     #Creating sequence name Tmux Sessions
[root@centos8 ~]# tmux new -s session_name     #Creating Named Tmux Sessions
Ctrl+b d     #Detaching from Tmux Session
[root@centos8 ~]# tmux ls     #list all Tmux Session
[root@centos8 ~]# tmux attach-session -t 0     #Re-attaching to Tmux Session
Ctrl+b %     #Split current pane horizontally into two panes
Ctrl+b "     #Split current pane vertically into two panes
Ctrl+b o     #toggle between panes
 
#####################################################


yum install net-snmp net-snmp-utils

systemctl enable snmpd
vim /etc/snmp/snmpd.conf
    com2sec notConfigUser  default       <CommunityName>
    group   notConfigGroup v2c           notConfigUser
    view    allview       included   .1
    access  notConfigGroup ""      any       noauth    exact  allview none none
systemctl restart snmpd