Why does PuTTY & SFTP has to be logged in separately? I thought they were all based on SSH

4

1

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?

est

Posted 2009-10-21T15:24:47.383

Reputation: 536

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 C. Thompson – 2010-10-27T04:58:16.883

5Wny not use a SSH key? – Lukáš Lalinský – 2009-10-21T15:27:30.843

3Why does LiveJournal and Facebook has to be logged in separately? I thought they were all based on the web. – Paul Tomblin – 2009-10-24T02:55:26.557

Answers

2

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.

est

Posted 2009-10-21T15:24:47.383

Reputation: 536

17

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.

ty812

Posted 2009-10-21T15:24:47.383

Reputation: 279

7

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

tangens

Posted 2009-10-21T15:24:47.383

Reputation: 1 230

2Pageant will cache your public/private key for authentication, it won't cache your passwords. – baumgart – 2009-10-21T15:31:33.877

You are right, I've corrected this. – tangens – 2009-10-21T15:33:44.593

ok, but need to clarify a bit about keys ... – hasen – 2009-10-24T02:30:13.393

4

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.

Dan

Posted 2009-10-21T15:24:47.383

Reputation: 839

2

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

Steven

Posted 2009-10-21T15:24:47.383

Reputation: 24 804

2

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.

jfmessier

Posted 2009-10-21T15:24:47.383

Reputation: 2 530

1

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.

Zak

Posted 2009-10-21T15:24:47.383

Reputation: 230

0

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

Benson

Posted 2009-10-21T15:24:47.383

Reputation: 101