Thursday, March 5, 2020

Change ssh port for ubuntu

  1. Edit the file and set Port option

    Type the following command:
    $ sudo vi /etc/ssh/sshd_config
    Locate line that read as follows:
    Port 22
    OR
    #Port 22
    To set the port to 2222, enter:
    Port 2222
  2. Updating your firewall to accept the ssh port 2222 in Linux

    If you are using UFW on a Ubuntu/Debian Linux, type:
    $ sudo ufw allow 2222/tcp
    The syntax for iptables is as follows
    $ sudo /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 2222 -j ACCEPT

  3. OR if you are using Ubuntu/Debian/Mint Linux:
    $ sudo service ssh restart
Test
ssh xxxx.xxxx.xxxx.xxxx -p 2222

Tuesday, March 3, 2020

Windows install pip

1. Open cmd as administrator
2. Install python
3. curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
4. Then run the following command in the folder where you have downloaded get-pip.py:
python get-pip.py

5. Add pip installation path to environment PATH
6. check
pip help