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?
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.
You can use the Pageant (an SSH authentication agent for PuTTY, PSCP and Plink). This program will cache your private keys.
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.
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.
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.
Even in OpenSSH (GNU/Linux)
scp are two separate programs. However, they do authenticate the same way (ie: look for the same public/private key files in $HOME/.ssh).
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.
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