Thursday, June 5, 2014

Remotely Access Kali Terminal Using Putty

In this post we will use PuTTy to remotely or locally access Kali terminal with root priveleges. We will use SSH for this tutorial, though you can use Telnet or any other mode too.

Putty

Some theoretical inforamtion about putty for your digestion.
PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers. (putty.org)

Download

You can download putty here. http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html . That's the official download location. Softpedia, CNET, etc. also provide downloads. You will find a lot of links there, and it will take a minute to find out what you need to download. However, for the sake of ease, the link below this line is likely to be what you are looking for.
A Windows installer for everything except PuTTYtel

Installation is quite easy, nothing you can't handle.

Kali Configuration

There are a few things that need to be done before PuTTy starts working. Firstly, you would be using SSH to connect to Kali (main advantage of SSH is that it's secure, you can search google for more info on SSH). By default, the SSH service isn't started in Kali, but you can still check with
root@kali:~# service --status-all
 [ - ]  ssh
It will display a long list. The - against ssh indicates it is not running. Depending on whether the SSH is installed or not, you can execute the following. Run the second command first, if it works fine the installation isn't required, if not, then execute first command.

root@kali:~#apt-get install openssh-server (to install SSH)
root@kali:~#service ssh start (to start the service)

Optional : If you are connecting remotely and are afraid that someone will eavesdrop your data, then you can use public private key encryption offered by SSH. For this you need to create an RSA key.
root@Kali:~# ssh-keygen -t rsa
You will have to specify where to store the key (just press enter for default location) and then specify a key. This step is quite unnecessary for most users.

Also, type ifconfig to get your eth0 ip address. 

Starting PuTTy on Windows


Start Putty, and you will see a putty configuration dialog. Enter the IP that you found out in the last step. The port will be 22 and connection type SSH. Click open and you'll be prompted to enter the credentials for terminal access. Type in 'root' and your password. You will now see something like this-
You can run commands from here and they will be executed on your Kali machine. There are no functionality restrictions as such, and you can do almost anything from this terminal. Type exit to end the session.

Auto start SSH on Kali Boot

Now every time you will boot into Kali, the SSH service will not be running. You will have to type the following everytime to boot - service ssh start

However, there are alternatives. One straightforward one is to go to Applications -> System Tools -> Preferences -> Startup Application and click on add. Enter the command as service ssh start and add whatever you feel like for Name and Comment (nothing technical there).

Alternatively, you can use update-rc.d to get the same functionality.  It helps add/remove services which will run at booting. Execute the following command to add SSH to startup services
root@kali:~#update-rc.d ssh enable

You can of course write your script to start ssh, but that wouldn't do us much good since starting the service is as easy as one line of code (service ssh start) and you don't write scripts that execute just one command (that is quite an inefficient way of usingputty scripts)

17 comments:

  1. But my ssh root login not support by using console.

    ReplyDelete
    Replies
    1. login as normal user and after that you can switch your account to ROOT login using su command

      Delete
  2. my ssh service dosnt get started

    ReplyDelete
  3. I read it three times, but could not get it. I came here to get ideas for Computer Science Research Topics, but sadly have to return empty-handed. It’s funny how a final semester computer science student is not able to understand these concepts. A big question mark on the higher education system.

    ReplyDelete
  4. autocad crack is the latest version of CAD software, essential both in the construction industry and in mechanical engineering. You can create 2D or 3D drawings for surface technology. It is one of the most popular graphics programs from Autodesk Corporation.
    autocad 2016 crack
    chimera tool premium crack

    ReplyDelete
  5. This process is very useful for us and through this, we can do work remotely and complete our tasks and job. Many people use it and they save their time and money. Dissertation writing services.

    ReplyDelete
  6. Our team works 24/7 to provide quality assistance in front of your queries like, “Can I pay someone to write my paper for me?” in a convenient manner. This is why your paper will never be delayed from our side. Also, we believe in producing high-quality content for all of our clients. So do not wait any further, and get in touch with us to sort out all your academic needs.

    ReplyDelete
  7. The ISO code of New Zealand is NZ according to the ISO 3166 standard. The local name of the country is Aotearoa. New Zealand capital city is Wellington. People in New Zealand speak the English, and Māori languages. On 25 November 1947, New Zealand emerged as a sovereign political entity. In the year 11/25/1947, New Zealand emerged as a sovereign political entity. The largest cities in New Zealand are Wellington, Auckland, Christchurch. http://www.confiduss.com/en/jurisdictions/new-zealand/

    ReplyDelete
  8. Thank you for the visit, thank you also have provided the information we really need, do not forget to share information and visit our page thank you. energylandia

    ReplyDelete
  9. During the covid, everyone began to study and work remotely. Therefore, this is not news.
    This is a great article and useful. I also work as a freelancer writing articles and essays at home.
    Our service has an academic essay database
    the choice is huge. On any subject.
    We write efficiently and quickly.
    We have a lot of feedback
    Detailed information can be found on the main page

    ReplyDelete
  10. Hong Kong is often referred to as a tax haven, because taxation rates are very low — dividends, offshore income and capital gains are not taxed at all. In charging tax, Hong Kong implements the territorial source principle. This means that, in general, income is taxed only when it is derived from business or trade inside Hong Kong. Nevertheless, there are a small number of business income sources to which the territorial source principle does not apply, and these revenues are taxed at source (for example, royalties received by non-residents for the use of literary property or copyrighted materials). http://www.confiduss.com/en/info/blog/article/hong-kong-company-formation/

    ReplyDelete
  11. I'm visiting your site for the first time, and I found this to be a very good tutorial. Good job for all the explanation, and giving hints on what else to look up on Wikipedia/Google to gain a greater understanding. Keep up the great work as I go through your other posts! Thank you
    Make girls chase you

    ReplyDelete

© Kali Tutorials, 2016. Unauthorized use and/or duplication of this material without express and written permission from this site’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Shashwat Chaudhary and Kali Tutorials with appropriate and specific direction to the original content.
Bitcoin: 1B5aLqJcMW7zznffTxQwta8JTZsxBDPguC