How can I access putty from linux terminal?

28,843

Solution 1

The PuTTY program is not built into Linux. What the other person meant is that most Linux systems come with commands that provide the same functionality as PuTTY:

  • The SSH client is ssh.

  • The Telnet client is telnet.

  • The serial console clients are screen and minicom.

To connect to the first serial port using screen, run:

screen /dev/ttyS0

Press CtrlA followed by CtrlK to disconnect. (Some systems use just K instead of CtrlK.)

Solution 2

Edit:

Putty does exist on Linux too (sudo apt-get install putty on most debian-ish systems), if Putty is exactly what you have a guide for - even though it's unnecessary on Linux.

To find the serial port to use for Putty/Minicom/Screen, you could plug in the cable and shortly after use dmesg | grep USB in a terminal to see the output (you should see something like New device on /dev/ttyUSB0 or various /dev/tty*'s to make sure you are attempting to connect to the correct Serial line.


As an alternative if Linux overwhelms you:

If all you need is access to the Serial connection and nothing specific from the Linux shell, then you can use Putty from Windows (I would assume you have access to a Windows machine as well). (Download Page).

Determine which Serial port (or "COM" port in windows) you need in Device Manager:

COM ports

Then in Putty, choose Serial, enter the COM port and the BAUD (Speed):

enter image description here

If you need advanced settings to the serial connection in PUTTY, you can do that in the left menu Connection > Serial

Share:
28,843

Related videos on Youtube

isuck
Author by

isuck

Updated on September 18, 2022

Comments

  • isuck
    isuck almost 2 years

    I'm trying to configure my cisco 2950 switch and I need to use putty on linux. Im not used to using linux but I've been told that putty is built in to linux terminal. I have my serial console cable connected to the router but I'm unable to telnet in. How do I use putty?

  • Kruug
    Kruug about 11 years
    You could also use Ctrl+A+D to disconnect but leave the screen running.
  • user1686
    user1686 about 11 years
    @Kruug: That's not always desirable when using screen as a serial console terminal, since it leaves the tty device busy and can cause confusion.
  • isuck
    isuck about 11 years
    when i type your command in the terminal it doesn't work.
  • user1686
    user1686 about 11 years
    when i read your comment it doesn't help. Got any details?
  • isuck
    isuck about 11 years
    well im in the linux terminal and trying to connect to the switch. I've got the console cable connected appropriately. I tried his command above ' screen /dev/ttyS0 ' but nothing happens, says command not found. if i type just /dev/ttyS0 i get 'permission denied'. I also tried 'telnet 192.168.1.1' and it reports 'no route to host'
  • user1686
    user1686 about 11 years
    Install screen, then.
  • isuck
    isuck about 11 years
    i dont know how to install screen...i never use linux machines. Rough day here.
  • nerdwaller
    nerdwaller about 11 years
    Serial ports, by default, are not open to regular users often times in Linux - so you may need to do sudo screen /dev/ttyS#, or add yourself to the group to have access. There is "putty" available in Linux, but unnecessary with screen or minicom. But if all you need is access to a serial port (and not local linux goodies), then you can use Putty in Windows and choose the COM port you want (you can find that in Device Manager.
  • Kruug
    Kruug about 11 years
    @isuck sudo apt-get install screen, assuming you're running Debian, Ubuntu, Mint, et al.
  • user1686
    user1686 about 11 years
    If I understood the question correctly, OP is connecting from a Linux box, not to one.
  • nerdwaller
    nerdwaller about 11 years
    @grawity - The question is confusing, because you can configure a Cisco system (enterprise) with a serial connection, doesn't really matter what from (i.e. platform agnostic, really). Since they voice that they haven't used Linux much, I simply am providing another solution (and there is a Putty in Linux too, if that's what they have a guide for). They could easily carry over a Windows box, plug in the serial cable and do it just the same. From seems irrelevant to the question since all commands for configuration would be built into the Cisco system.
  • sawdust
    sawdust about 11 years
    IMO you should really edit your answer, because it is upside down. Put the section titled "Edit" as your main answer (since it actually answers the title question, as opposed to the other "answer" that says "use this instead"). Then reuse & describe your original text as an alternative to the OP's situation.