How can I access putty from linux terminal?

2

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?

isuck

Posted 2013-04-09T19:41:46.177

Reputation: 21

Answers

7

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.)

user1686

Posted 2013-04-09T19:41:46.177

Reputation: 283 655

You could also use Ctrl+A+D to disconnect but leave the screen running. – Kruug – 2013-04-09T19:52:11.423

@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. – user1686 – 2013-04-09T19:53:37.723

when i type your command in the terminal it doesn't work. – isuck – 2013-04-09T19:54:01.553

2when i read your comment it doesn't help. Got any details? – user1686 – 2013-04-09T19:54:36.710

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' – isuck – 2013-04-09T20:00:09.137

Install screen, then. – user1686 – 2013-04-09T20:02:03.480

i dont know how to install screen...i never use linux machines. Rough day here. – isuck – 2013-04-09T20:06:16.863

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. – nerdwaller – 2013-04-09T20:39:02.057

1@isuck sudo apt-get install screen, assuming you're running Debian, Ubuntu, Mint, et al. – Kruug – 2013-04-09T20:42:19.423

1

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

nerdwaller

Posted 2013-04-09T19:41:46.177

Reputation: 13 366

If I understood the question correctly, OP is connecting from a Linux box, not to one. – user1686 – 2013-04-09T20:58:10.490

@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. – nerdwaller – 2013-04-09T21:33:50.430

2IMO 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. – sawdust – 2013-04-10T00:49:52.903