Niki Nuryadin

Let’s sharing IT knowledge

Aptana Studio 3 SFTP Key Exchange

If you get this error when trying to connect to remote server via SFTP:

“Establishing SFTP connection failed: No suitable key exchange algorithm could be agreed.
No suitable key exchange algorithm could be agreed.”

Solution:

1. On remote server edit sshd_config:

#nano /etc/ssh/sshd_config

2. Add the following line :

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,blowfish-cbc,aes128-cbc,3des-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
KexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

3. Restart ssh service

#/etc/init.d/ssh restart

19 Mei 2015 Posted by | Uncategorized | 4 Komentar

Setting Domain At Ubuntu 12.04

Step1: Install & configure Bind9

#apt-get update

#apt-get install bind

#touch /etc/bind/db.domain.com

#cp /etc/bind/db.local /etc/bind/db.domain.com

#nano /etc/bind/db.domain.com

; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.domain.com. root.domain.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS domain.com.
@ IN A 192.168.1.2
domain.com. IN A 192.168.1.2
@ IN AAAA ::1
ns IN A 192.168.1.2
www IN A 192.168.1.2 domain

***warning: +1 serial number on every update this file before restarting Bind

#touch /etc/bind/sub.domain.com

#cp /etc/bind/db.127 /etc/bind/sub.domain.com

#nano /etc/bind/sub.domain.com

;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.domain.com. root.domain.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS domain.com.
2 IN PTR domain.com.
2 IN PTR http://www.domain.com.
ns IN PTR 192.168.1.2
@ IN AAAA ::1

***warning: +1 serial number on every update this file before restarting Bind

$named-checkzone domain.com /etc/bind/db.domain.com
$named-checkzone domain.com /etc/bind/sub.domain.com

#service bind9 restart

#dig domain.com

; <<>> DiG 9.8.1-P1 <<>> domain.com

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62798

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;domain.com. IN A

;; ANSWER SECTION:

domain.com. 604800 IN A 192.168.1.2

;; AUTHORITY SECTION:

domain.com. 604800 IN NS domain.com.

;; ADDITIONAL SECTION:

domain.com. 604800 IN AAAA ::1

;; Query time: 0 msec

;; SERVER: 192.168.1.2#53(192.168.1.2)

;; WHEN: Fri Nov 28 14:36:30 2014

;; MSG SIZE rcvd: 88

#nslookup domain.com

Server: 192.168.1.2

Address: 192.168.1.2#53

Name: domain.com

Address: 192.168.1.2

#nano /etc/hosts

127.0.0.1 localhost

192.168.1.2 ;

Note: If still fail please see at log

#tail /var/log/syslog

Step-2: Pointing domain at domain registar.

1. Entering domain configuration > Manage Domain.

2. Setting Add Record DNS: > Managemen Tools > Manage DNS.

3. Add Record DNS

  • Domain setting A Record leave blank.
  • TTL leave to default :14400
  • Record Type  : A
  • Write your IP static number.

1 Desember 2014 Posted by | Linux, Networking, Uncategorized | Tinggalkan komentar

Remote access MySQL database

1. Edit my.cnf file, comment as following lines:

  # bind-address = 127.0.0.1

  # skip-networking

2. Restart MySQL:

  serverdebian# /etc/init.d/mysql restart

3. Login to MySQL;

   # mysql -u root -p

   mysql> GRANT ALL ON *.* TO root@'%' IDENTIFIED BY 'PASSWORD';

   mysql> FLUSH PRIVILEGES;

   mysql> exit;

10 Maret 2014 Posted by | MySQL database | Tinggalkan komentar

Solution for missing apostrophe in php

<input name=”content” type=”text” id=”textfield” value=”<?php echo stripslashes(ereg_replace(‘”‘,'”‘,$content)); ?>”>

22 Februari 2014 Posted by | php | Tinggalkan komentar

Fix Android USB driver on Ubuntu

Step 1: Check Device
#cd android-sdk-linux/platform-tools
#./adb devices
List of devices attached
??????????????  device

Step 2: Check ID vendor device
#lsusb
Bus 003 Device 006: ID 04e8:689e Samsung Electronics Co., Ltd
In this case vendor ID is 04e8.

Step 3: Add device to usb list 
#sudo nano /etc/udev/rules.d/xx-android.rules
xx = two digit number
Add this line:
SUBSYSTEM==”usb”, SYSFS{idVendor}==”04e8″, MODE=”0666″
or
SUBSYSTEM==”usb”, ATTR{idVendor}==”04e8″, MODE=”0666″, GROUP=”plugdev”

#sudo chmod a+r /etc/udev/rules.d/xx-android.rules
#sudo service udev reload
#./adb kill-server
#./adb devices

Reference – http://developer.android.com/tools/device.html

27 Februari 2013 Posted by | Android, Linux | Tinggalkan komentar

Installing the Android SDK

Step 1: Verify JDK is installed

Make sure the Java SE Development Kit (JDK) is installed and that you’re running at least Platform version 3.5.2 (Galileo) or newer. This can be verified from the ‘About Eclipse’ screen by selecting ‘Installation Details’ and checking under the ‘Features’ tab or the Windows Control Panel and opening the “Programs & Features” list. If you already have the JDK installed, you can skip  step 2.

Step 2: Installing the Java Development Kit (JDK)

    1. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html.
    2. Scroll down to “Java SE 6 Update 31” and click the red download button under “JDK”.
    3. Accept the license agreement and download the file “jdk-6u31-windows-i586.exe” (for 32-bit Windows) or “jdk-6u31-windows-x64.exe” (for 64-bit Windows).
    4. Run the installer executable and follow the prompts, accepting default options.

Step 3: Download the Android SDK

Download the Android SDK from http://developer.android.com/sdk/index.html and unpack it.

Step 4: Install ADT plugin

Start eclipse go to Help > Install new software. Click Add on the top right corner.
Enter the following URL: https://dl-ssl.google.com/android/eclipse/ Check developer tools, click Next.
After you restart Eclipse, it will prompt you for the Android SDK installation directory. Select “Use existing SDKs” and browse to the directory where you downloaded the Android SDK.

24 Februari 2013 Posted by | Android | 2 Komentar

Ubuntu error saat update dan install

E: Could not get lock /var/cache/apt/archives/lock – open (11 Resource temporarily unavailable)
E: Unable to lock the download directory

solusinya begini :

sudo rm /var/cache/apt/archives/lock

20 April 2012 Posted by | Linux | Tinggalkan komentar

ssh without password

ServerA dan ServerB keduanya menjalankan ssh daemon.

1. Mengijinkan ServerA meremote SSH ke ServerB tanpa password:
    # ssh-keygen -t rsa
Perintah diatas akan menghasilkan dua file id_rsa.pub dan id_rsa

2. Salin/copy file id_rsa.pub ke ServerB :
    #scp ~/.ssh/id_rsa.pub server.ip.address:.ssh/authorized_keys
Pastikan folder .ssh/authorized_keys ada
Masukkan password jika diminta.

4. Coba ssh ke ServerB dari ServerA tanpa password:
    # ssh serverB uname -a
Perintah diatas akan menjalakan “uname -a” di ServerB dan hasilnya ditampilkan ke ServerA.

Prosedur yang sama bisa di terapkan juga di ServerB, dimana ServerB me-SSH ServerA tanpa password.

Bila serverB menolak koneksi, remove terlebih dahulu  keygen yg ada:

   #ssh-keygen -R {ssh.server.ip.address}

Atau

#ssh-keygen -f “/root/.ssh/known_hosts” -R  serverB.ip.address

20 September 2011 Posted by | Linux | Tinggalkan komentar

Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

1. Create the directory (if it doesn’t already exist).
#sudo mkdir /var/run/mysqld/

2. Create the file by “touching”
#sudo touch /var/run/mysqld/mysqld.sock

3. Set the ownership of the mysqld.sock file and folder to mysql.
#sudo chown -R mysql /var/run/mysqld/

4. Start mysql:
/etc/init.d/mysql restart

If this solution isn’t work then you have to look at  my.cnf  file which it can make you confused. Replacing my.cnf with original one  is better.

17 September 2011 Posted by | Tip & Trik | 4 Komentar

MySQL Tip

Auto repair, check and optimize all the tables in all databases running on a MySQL server:

mysqlcheck -u root -p –auto-repair –check –optimize –all-databases

Synchronizing MySQL Database

Syncronize local database with remote one:
ssh user@www.my_domain.com “mysqldump -u my_remote_db_username –password=my_remote_db_password my_remote_db_name”
| mysql -u my_local_db_username –password=my_local_db_password –host=localhost -C my_local_db_name

Syncronize remote database with local one:
mysqldump -u my_local_db_username –password=my_local_db_password –host=localhost -C my_local_db_name | ssh user@www.my_domain.com “mysql -u my_remote_db_username –password=my_remote_db_password my_remote_db_name”

26 Agustus 2011 Posted by | Uncategorized | Tinggalkan komentar