Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm setting up a VM based Linux Mint 14 Cinnamon dev env and just installed putty to connect to my Ubuntu servers. Problem is that when I try to use "username@hostname" or "username@ip" (no quotes obviously) then I get the error "Unable to open connection to username@hostname: Name or service not known".

If I use just the hostname or IP it connects fine - it asks for the username and then correctly logs in using my private key.

On my Windows 8 host machine I use "username@hostname" in Putty's Host Name field and it works flawlessly.

Does the Linux putty use a different syntax in the host name field? I checked around but couldn't find anything.

share|improve this question
I think you are answering your own question, clearly it does have a different syntax since your usual one does not work :). Why in the world would you want to use putty for linux? Why not just ssh directly? – terdon Dec 2 '12 at 13:39
@terdon The syntax differs using the command line. I'm referring to the GUI, which should also have an option to set the username. – AndyAtTheWebists Dec 2 '12 at 19:46
I realize that but if the windows syntax does not work then the linux one must be different. Seriously though, why do you want putty on linux? What does it offer over normal ssh? You can simply open a terminal and type ssh user@host. – terdon Dec 2 '12 at 20:06
Fair enough question. I'm switching from Windows to doing my dev work in a Linux VM. I guess I was just sticking to solutions I'm used to as part of my usual workflow. Just one less thing to figure out for when I need to setup port forwarding or something. I have started using ssh and zssh now instead. – AndyAtTheWebists Dec 3 '12 at 9:18
up vote 0 down vote accepted

It does look like you can't specify a username in the putty GUI. However, you do not need to use putty if what you want to do is connect to other linux hosts over ssh. Just open a terminal and type:

ssh user@host

This will do exactly what putty does for you in windows.

If you want putty in order to save connections, add lines like the following into your ~/.bashrc file (the following are adapted from mine):

alias myserver='ssh myuser@myserver'
alias petitbonum='ssh bob@petitbonum' 
alias docpad='ssh terdon@docpad.local'
alias badabing='ssh -Y lacoloc@'

Obviously, change the user and server names and/or IPs to whatever you need. Then, you open a new terminal and type, for example, myserver and hit enter. This will run the command defined in the alias you placed in .bashrc.

share|improve this answer

Maybe previous versions of PuTTY on Linux didn't allow this, but version 0.63 lets you specify a username in the Connection section of the initial configuration dialog.

Conection -> Data -> "Auto-login username"

You can save it under "Saved Sessions."

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .