Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Why does PuTTY & SFTP has to be logged in separately? I hate typing my password twice to transfer multiple files. Why can't I type my username & password into a SSH client, then it log on to both SSH and SFTP? Does this kind of tool exist or it is programatically imposible?

share|improve this question

migrated from stackoverflow.com Oct 21 '09 at 15:40

This question came from our site for professional and enthusiast programmers.

5  
Wny not use a SSH key? –  Lukáš Lalinský Oct 21 '09 at 15:27
3  
Why does LiveJournal and Facebook has to be logged in separately? I thought they were all based on the web. –  Paul Tomblin Oct 24 '09 at 2:55
    
On Linux, ssh can do exactly what you want -- multiple sessions can share a single connection. I have no idea what support exists for this feature in PuTTY or windows. –  Ryan Thompson Oct 27 '10 at 4:58
add comment

9 Answers 9

up vote 0 down vote accepted

Thanks for the tips, guys, I know you can use a private key to login, but I still do not understand the design here, why not login once, use SSH, SCP, SFTP or whatever you want? They can eve share connections! Is this theoretically possible? Why hasn't anyone made something like this?

EDIT: solved it myself. Bitvise Tunnelier can open cas much as consoles, SFTP window as possible with a single SSH connection.

share|improve this answer
add comment

The "why" is because PuTTY and PSFTP are two separate free-standing programs - the school of thought behind their design is "do one thing, and do it well", and that "one thing" is being a SSH terminal/SFTP client.

To do what you're looking for - use one password to log into both an SSH and SFTP session - you need one piece of software that's designed to do both things. I use WinSCP for this, and it's both free and Free. Its built-in terminal is somewhat underpowered, but if you also have PuTTY on your computer and tell WinSCP where it is (and set the preference to remember your session password and pass it to PuTTY), it will do what you ask - from an open WinSCP session you can do a Ctrl-P, and it will open a PuTTY instance, connect it to the same server, and log in with the password you used to log into WinSCP.

share|improve this answer
add comment

There are commercially available tools that share a single connection between ssh and scp/sftp. For better or worse, putty's tools are individual executables, so that doesn't work. As others have suggested, it's possible to set up ssh keys to mitigate the password typing, but in the end, that results in establishing multiple connections. If you really want to share a connection for everything, check out the official ssh client: link text

share|improve this answer
add comment

If on Linux, you can use curl to do your sftp transfers. If on Windows, you may need to compile for sftp/scp/ssh support.

share|improve this answer
add comment

In putty and pscp, you need to go into your connection manager and set your username for each connection. When you install your public key onto the box you are logging in to, you will get neither the username prompt, nor the password prompt. The only thing you will have to do is unlock your private key a single time when you start Pageant. Then login to your heart's content with no prompting necessary.

share|improve this answer
add comment

SSH for a shell terminal, for secure FTP or X session over SSH, they all rely on the same underlying protocol: SSH. Which application you use for your session, it does not matter. SSH is the key point here. Pageant is a great utility to handle the passwords of your keys, and many programs will use pageant to make the login seamless to you. I use PuTTY all day long at work, as well as FileZilla, which is another SSH-based client software that can take advantage of Pageant.

Also, you can have several SSH-based connections to a single server, and it does not matter, just as for any other TCP/IP protocol. I have servers where I have to be logged in both as a normal user and as root. This is easier than using the sudo command, which causes some problems from time to time. I just make sure I have VERY DIFFERENT prompts, of course......

As for pageant, I use its accompanying application, which is creating the key pairs, allowing me to copy'n'paste to the ~/.ssh/autorized_keys file. Works great for me.

share|improve this answer
add comment

Putty and SFTP are two separate programs which open one connection each, and both connections have to be authenticated seperately. Thus: Two logins.

This is akin of logging in to SO with Firefox and MSIE at the same time. Both use HTTP, but they open up a connection each.

share|improve this answer
add comment

Even in OpenSSH (GNU/Linux) ssh and scp are two separate programs. However, they do authenticate the same way (ie: look for the same public/private key files in $HOME/.ssh).

share|improve this answer
add comment

You can use the Pageant (an SSH authentication agent for PuTTY, PSCP and Plink). This program will cache your private keys.

share|improve this answer
1  
Pageant will cache your public/private key for authentication, it won't cache your passwords. –  baumgart Oct 21 '09 at 15:31
    
You are right, I've corrected this. –  tangens Oct 21 '09 at 15:33
    
ok, but need to clarify a bit about keys ... –  hasenj Oct 24 '09 at 2:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.