Kamis, 27 Desember 2018

How to show saved wifi password windows with command line

  Tidak ada komentar
Running the following command on command prompt window
netsh wlan show profile [SSID_NAME] key=clear
for example
Microsoft Windows [Version 10.0.17134.472]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\Dell>netsh wlan show profile wifi.id key=clear

Profile wifi.id on interface Wi-Fi:
=======================================================================

Applied: All User Profile

Profile information
-------------------
    Version                : 1
    Type                   : Wireless LAN
    Name                   : wifi.id
    Control options        :
        Connection mode    : Connect automatically
        Network broadcast  : Connect only if this network is broadcasting
        AutoSwitch         : Do not switch to other networks
        MAC Randomization  : Disabled

Connectivity settings
---------------------
    Number of SSIDs        : 1
    SSID name              : "wifi.id"
    Network type           : Infrastructure
    Radio type             : [ Any Radio Type ]
    Vendor extension          : Not present

Security settings
-----------------
    Authentication         : WPA2-Personal
    Cipher                 : CCMP
    Authentication         : WPA2-Personal
    Cipher                 : GCMP
    Security key           : Present
    Key Content            : Navisha1234

Cost settings
-------------
    Cost                   : Unrestricted
    Congested              : No
    Approaching Data Limit : No
    Over Data Limit        : No
    Roaming                : No
    Cost Source            : Default


C:\Users\Dell>

Rabu, 26 Desember 2018

How to perform yum install trough ssh tunnel

  Tidak ada komentar
Run all  following commands on the computer with restricted access.

in yum.conf set the proxy as follows
proxy=socks5h://localhost:1080
from a terminal type
ssh -D 1080 YOUR_USER@YOUR_SERVER_WITH_FULL_WEB_ACCESS
press enter and type your password.


now, in a separate terminal (not the ssh one) type

yum update
now you can perform yum install

If you failed with scenario above you can use the following step

Run all following commands on the computer with restricted access.

in yum.conf set the proxy as follows
proxy=http://localhost:1080
from a terminal type
ssh -R 1080:ssh.server:1080 [email protected]
press enter and type your password.


now, in a separate terminal (not the ssh one) type

yum update
now you can perform yum install

Sabtu, 22 Desember 2018

How to fix Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys

  Tidak ada komentar
Some day i got error How to fix Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys when try login to the server using public key, i checked the error log in secure log file and here are the result
Dec 23 12:03:06 esb sshd[28559]: Authentication refused: bad ownership or modes for file /home/wahid/.ssh/authorized_keys
Dec 23 12:03:06 esb sshd[28559]: Authentication refused: bad ownership or modes for file /home/wahid/.ssh/authorized_keys
Dec 23 12:10:48 esb sshd[29428]: Authentication refused: bad ownership or modes for file /home/wahid/.ssh/authorized_keys
Change the privileges mode of ssh folder and authorized_keys file 
[wahid@esb ~]$ chmod 700 .ssh/
[wahid@esb ~]$ chmod 600 .ssh/authorized_keys
[wahid@esb ~]$
Ssh login using public key successfully 
login as: wahid
Authenticating with public key "rsa-key-20181223" from agent
Last login: Sun Dec 23 12:25:38 2018 from 192.168.72.234
[wahid@esb ~]$ ls -aslht
total 40K
4.0K drwx------.  5 wahid wahid 4.0K Dec 23 12:24 .
4.0K drwx------.  2 wahid wahid 4.0K Dec 23 12:24 .ssh
4.0K -rw-------.  1 wahid wahid 3.2K Dec 23 12:24 .viminfo
4.0K -rw-------.  1 wahid wahid 1.1K Dec 23 12:18 .bash_history
4.0K drwxr-xr-x. 10 root  root  4.0K Jan 14  2018 ..
4.0K drwxr-xr-x.  4 wahid wahid 4.0K Jan 12  2016 .mozilla
4.0K -rw-r--r--.  1 wahid wahid   18 Jul  9  2013 .bash_logout
4.0K -rw-r--r--.  1 wahid wahid  176 Jul  9  2013 .bash_profile
4.0K -rw-r--r--.  1 wahid wahid  124 Jul  9  2013 .bashrc
4.0K drwxr-xr-x.  2 wahid wahid 4.0K Jul 14  2010 .gnome2
[wahid@esb ~]$



Jumat, 07 Desember 2018

How to check db2 version

  Tidak ada komentar
Login as db admin user and running db2level command as shown on following figure
# su - db2inst1
$ db2level
DB21085I  Instance "db2inst1" uses "64" bits and DB2 code release "SQL10010"
with level identifier "0201010E".
Informational tokens are "DB2 v10.1.0.0", "s120403", "AIX64101", and Fix Pack
"0".
Product is installed at "/apps/IBM/db2/V10.1".

$

How to check Oracle version from command line

  Tidak ada komentar
We can running following command line
SQL> SELECT * FROM V$VERSION;

BANNER
--------------------------------------------------------------------------------
    CON_ID
----------
Oracle Database 12c Release 12.1.0.1.0 - 64bit Production
         0

PL/SQL Release 12.1.0.1.0 - Production
         0

CORE    12.1.0.1.0      Production
         0


BANNER
--------------------------------------------------------------------------------
    CON_ID
----------
TNS for Linux: Version 12.1.0.1.0 - Production
         0

NLSRTL Version 12.1.0.1.0 - Production
         0


SQL>
Or
SQL> SELECT version FROM V$INSTANCE;

VERSION
-----------------
12.1.0.1.0

SQL>