Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

The history of computer programming languages

The history of computer programming languages

The history of computer programming languages is a fascinating journey that spans several decades. Here's a brief overview of key milestones in the evolution of programming languages:

1. Machine Code and Assembly Language (1940s):

  • In the early days of computing, programmers worked directly with machine code, the binary language understood by computers.
  • Assembly language, a low-level programming language using mnemonic codes, was introduced to make programming more human-readable.

2. Fortran (1957):

  • Developed by IBM, Fortran (short for Formula Translation) was the first high-level programming language.
  • Designed for scientific and engineering calculations, Fortran introduced the concept of a compiler, translating high-level code into machine code.

3. Lisp (1958):

  • Developed by John McCarthy, Lisp (short for List Processing) was one of the earliest high-level languages designed for symbolic reasoning and artificial intelligence research.
  • Known for its unique approach to code as data and vice versa.

4. COBOL (1959):

  • COBOL (COmmon Business-Oriented Language) was developed for business, finance, and administrative systems.
  • It aimed to be easily readable by non-programmers and introduced the concept of English-like syntax.

5. ALGOL (1958-1960):

  • ALGOL (ALGOrithmic Language) was developed to be a universal, algorithmic language.
  • ALGOL 60, a later version, influenced many subsequent languages and introduced key concepts like block structures.

6. BASIC (1964):

  • Beginner's All-purpose Symbolic Instruction Code (BASIC) was developed to make programming more accessible to non-experts.
  • BASIC played a significant role in the early personal computer era.

7. Simula (1967):

  • Simula was developed for simulation and introduced the concept of object-oriented programming (OOP).
  • OOP became a fundamental paradigm in many later languages.

8. C (1972):

  • Developed at Bell Labs by Dennis Ritchie, C became a popular and influential programming language.
  • It was used to create the UNIX operating system and later served as the foundation for C++.

9. Pascal (1970):

  • Developed by Niklaus Wirth, Pascal was designed for teaching programming and good software engineering practices.
  • It introduced structured programming concepts.

10. C++ (1983):

  • An extension of C, C++ introduced object-oriented programming features.
  • It became widely used in systems programming and game development.

11. Java (1995):

  • Developed by Sun Microsystems, Java aimed to be a platform-independent language.
  • Java's "Write Once, Run Anywhere" philosophy made it popular for web development.

12. Python (1991):

  • Created by Guido van Rossum, Python prioritizes readability and ease of use.
  • Python has become a versatile language used in web development, data science, artificial intelligence, and more.

13. JavaScript (1995):

  • Developed by Netscape, JavaScript was initially designed for client-side web development.
  • It has since evolved into a versatile language used for both client and server-side scripting.

14. C# (2000):

  • Developed by Microsoft, C# (C Sharp) is a modern, object-oriented language designed for the .NET framework.
  • It's widely used for Windows applications and web development.

15. Swift (2014):

  • Developed by Apple, Swift is a programming language for iOS, macOS, watchOS, and tvOS app development.
  • It aimed to provide a more modern and safer alternative to Objective-C.

The history of programming languages continues to evolve, with new languages emerging to address specific needs and trends in technology. Each language contributes unique features and concepts that shape the landscape of software development.

SFTP : Windows Open SSH Server, Connecting through Linux Client Using Public Key

SFTP (SSH File Transfer Protocol) is a secure file transfer protocol runs over the SSH protocol. It supports the full security and authentication functionality of SSH.

SFTP has replaced legacy FTP as a file transfer protocol provides all the functionality with security and reliability.

SFTP also protects against password sniffing and man-in-the-middle attacks. It protects the integrity of the data using encryption and cryptographic hash functions, and authenticates both the server and the user.


OpenSSH Installation using .zip file

  • Goto https://github.com/PowerShell/Win32-OpenSSH/releases
  • Download the OpenSSH-Win64.zip file from the latest release
  • Extract the zip file contents to the folder C:\Program Files\OpenSSH

  • Open a command prompt as Administrator and use the following command to change to openssh directory
  • cd "C:\Program Files\OpenSSH"
  • Run the following command 
    powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1



  • Now the sshd and ssh-agent windows services should be installed. This can be seen in the services.msc window
  • Change the startup type to Automatic from Manual and start both the services. Since we have set the startup type as automatic, both the services will start automatically upon system startup.
  • Create the appropriate firewall policy to expose the SFTP port 22 to local or remote systems if required
  • Now SFTP server accepts connections using username and password authentication

Setup SFTP server in newer versions of windows

  • Click windows button and search for “manage optional features”
  • Click on “add a feature” and search for OpenSSH server and install it
  • Now Open SSH server and OpenSSH Authentication agent services should be installed in the services.msc window
  • You ca right click and change the start up type of both the services as automatic if you want the services to start upon system start up
  • Create the appropriate firewall policy to expose the SFTP port 22 to local or remote systems if required
  • Now SFTP server accepts connections using username and password authentication

Downsides of password based authentication in SFTP

  • OS user credentials of the server operating system are to be shared with the SFTP client which is not desirable
  • OS user password is to be changed to change the password of SFTP client
  • OS user password will be transmitted over the network

Benefits of using public key based authentication in SFTP

  • This type of authentication is more robust and secure
  • SFTP client need not know the OS user password
  • Multiple clients can use different private keys for a single OS user
  • Private key can be changed easily from time to time without changing the user’s OS password
  • Access of SFTP client can be easily revoked by just removing the client’s public key from the authenticated list, without locking out or modifying the OS user account

Setup public key based authentication in Linux

  • Open a terminal window and run ssh-keygen command. Press enter till the execution is complete as shown in the image below


  • During the key generation process, password protection can be set to private key by entering a passphrase as shown in the above image. This ensures additional protection in case the private key is in wrong hands
  • The public key will be saved as /home/<username>/.ssh/id_rsa.pub (home directory of user and /root for root directory)  and private key will be saved as /home/<username>/.ssh/id_rsa (home directory of user and /root for root directory)


Place the public key in the SFTP server

  • Use following scp (secure copy) command to copy the public key in the server directory (The default directory is C:/ProgramDate/ssh) as shown in the screenshot
  • scp .ssh/id_rsa.pub  <username>@<sftp server ip or hostname>:/C:/ProgramData/scp  

Copying Public Key in authorized_key

  • Method 1 : If you have direct access to Windows Server, than open command prompt go to C:/ProgramData/ssh and use type command to copy/append the public key in administrators_authorized_key


  • Method 2: 
    • If you don't have direct access to Windows Server than Login to server with SSH  from Linux as shown below to copy the public key in administrators_authorized_key as shown bellow. 

    • After Entering the Password it will show the windows login as shown below screen shot


    • Goto C:/ProgramData/ssh directory and enter following command as shown in the screenshot


Change the Permission of the administrators_authorized_keys file using following command directly from 

  • Use following command to allow the access permission of administrators_authorized_key to only administrator and system users of windows operating system. 

icacls administrators_authorized_keys /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F"


Enabling Public Key authentication 

  • Goto Server C:/ProgramData/ssh folder open sshd_config file in notepad in admin mode and uncomment pubkeyAuthentication yes line and save the file. 
 


  • Restart the Openssh services and try to login without password from the Linux box


  • Now you are able to login have complete access on User Home directory 



  • If you want to give access to specific folder, add following line at the of  sshd_config  file and restart the service.
    • In this demonstration I have used SFTP_Root folder present in user home directory.
Match User <username>
ChrootDirectory ~/<directoryname>
X11Forwarding no
AllowTcpForwarding no
PermitTTY no
ForceCommand internal-sftp
PasswordAuthentication no



  • It will give access SFTP_Root folder only




How to get the File from the server 

Method 1: Login to the sftp server and use get command to get the file as shown in the screenshot



Method 2: Directly download the file from the command prompt using sftp command as shown in the screenshot bellow




Thanks for reading this blog.








What is an aptitude?


What are aptitudes? Aptitudes are an individual's inherent talents and abilities for learning or doing certain things in different areas. For example, a person's ability to carry a tune is considered an aptitude. Most people have several related talents, such as singing, reading music, and playing a musical instrument


Aptitude is the innate or acquired capacity for something. Aptitudes can range from developed knowledge, learned or acquired abilities (otherwise known as skills), talents, or attitudes necessary to perform a task. In essence, aptitudes are traits that help us accomplish tasks.