Skip to main content

How to configure banner in linux

run below cmd to set the banner

vi /etc/issue.net

after that in vi editor please type your customized Banner save the file using

esc + wq!

now open the ssh configuration file

vi /etc/ssh/sshd_config


now search and remove #in front of "banner" word and provide the path to issue.net as replacement of current one

Banner /etc/issue.net


now run the below cmd

 /etc/init.d/sshd  restart











Comments

Popular posts from this blog

Encryption and Decryption functions for Java

    public static String encrypt(String key, String initVector, String value) {         try {             IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));             SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");             Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");             cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);             byte[] encrypted = cipher.doFinal(value.getBytes());             System.out.println("encrypted string: "                     + Base64.encodeBase64String(encrypted));             return Base64.encodeBase64String(encrypted);         } catch (Exception ex) {   ...

Java function to read from sql database

 public static ResultSet sqlread(String S){       ResultSet rs = null;        try     {       // create a mysql database connection       String myUrl = "jdbc:mysql://localhost:3306/firewall?zeroDateTimeBehavior=convertToNull";       Class.forName("com.mysql.jdbc.Driver");       Connection conn = DriverManager.getConnection(myUrl, "root", "Cns@54321");             Statement st = conn.createStatement();       // note that i'm leaving "date_created" out of this insert statement         rs = st.executeQuery(S);           }        catch (Exception e)     {       System.err.println("Got an exception!");       System.err.println(e.getMessage());     }        return rs;   } 

Disabling DEP(data Excecution prevention) for third party softwares in windows

1.go to system properties. 2.go to Advanced system settings . 3. go to Advance tab ,performance settings,Data execution prevention tab make sure u have selected 1st option as highlighted in screenshot.after making changes you must restart system