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.

I generated a key for use with SSH (Subversion) on my Unix server, and I need to download the key.

I tried to use an FTP program but the folders are hidden i.e. /.ssh/

Can someone download them while in my putty/telnet session?

share|improve this question

migrated from stackoverflow.com Jul 28 '09 at 1:46

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

1  
ssh is not the same as telnet. Either fix the title or the tags. Second, most FTP clients have a "show hidden files" option. (FTP is too insecure to be an answer though.) –  grawity Jul 28 '09 at 6:52
add comment

9 Answers

You can use SCP or SFTP for transferring files over SSH.

But you should be able to do what you need in your ftp client. Look in the client's settings for where you can set the list command, and append "-ah" to the end of it. Your ftp client might even have a setting to display hidden files

share|improve this answer
add comment

You could try using Le Putty and do a ZMODEM transfer using sz.

share|improve this answer
1  
Aren't you a little young to know about zmodem, sonny? +1 for know a client that has it, though. –  dmckee Jul 28 '09 at 2:04
2  
Hey now...I've had to blow the dust of some X/ZMODEM once or twice in my career. ;-) –  dlux Jul 28 '09 at 2:13
    
Sure, but I've got six or seven years on you and most of my peers never used it. 'Course I lived on the trailing edge of the technological curve for a long while... –  dmckee Jul 28 '09 at 2:25
2  
Anytime you accidentally blow away the IOS image on a Cisco device.. you'll get to practice your xmodem skillz. Only made that mistake once.. but I've helped others fix theirs since then. –  romandas Jul 28 '09 at 3:22
add comment

I had similar problem, I used the copy feature in putty - just select (hilites text) in putty window and you can paste directly into Windows app. This is ok for key files since they will fit in one screen.

If you have a larger amount of text I've resorted to just mailing the file I need to myself

share|improve this answer
add comment

Is there something preventing you from copying them to a location from which you can FTP them?

share|improve this answer
add comment

Best to use sftp or an ftp client that will allow you to display and get hidden files.

But the answer to the question as written is: in the bad-old-days, we used [xyz]modem to do this. Putty may even have this technology built in, but you'll need the send client (called sz on unix machines) at the far end for this to work.

share|improve this answer
add comment

I'm assuming since you're using PuTTY, that you're probably running from Windows, and you're connecting over SSH, not Telnet (since you talked about generating an SSH key for SVN). If so, you might want to look into WinSCP, instead of using FTP to access your data on the remote system. (SCP/SFTP adds in the inherent security of SSH, whereas FTP passes your username and password "in the clear" to the remote system). It's a graphical client that is built on top of the PuTTY source.

share|improve this answer
add comment

I like the ZModem suggestion, but I'm surprised nobody has suggested uuencode yet, which shouldn't require a different SSH client -- assuming most terminal packages can simply log the terminal output to a file. Even if it can't, short enough files fit on screen and can be copy/pasted to a Notepad window.

So, on the UNIX side, uuencode the binary file you want to send, capture the terminal's text output of that uuencoding to a text file in Windows, and then uudecode that text file on the Windows side to reconstitute the original binary file. Very primitive, but it works like a charm.

See this Wikipedia article on Uuencoding. I trust you can find uuencode/uudecode utilities as part of the excellent Cygwin project.

share|improve this answer
    
By the way, if the files are already text, you don't need to uuencode them, just capture or copy/paste. But I would hope that's obvious :-) –  Chris W. Rea Jul 28 '09 at 2:58
add comment

For a SSH key specifically, you can probably just make the terminal window larger, cat ~/.ssh/id_rsa.pub and copy the key (by selecting the text) and pasting locally.

For larger, or binary files, look into SCP (or SFTP)

share|improve this answer
add comment

You're using Putty, which is basically 30 year old technology. Back in those days it was too difficult to add multitasking to user level software, so the answer is "no".

You'll need to start another program, scp, etc. and use it to transfer the files. If both sides, client and remote system, are unix, you can use ~ followed by ctl-Z (no space or return after the tilde) and that will suspend your putty session and then you can start using scp, or whatever, to transfer the file. After that's done then use the unix fg command to reconnect to your suspended, background putty.

share|improve this answer
1  
...dude, how exactly is PuTTY 30-year-old? (I'd understand if you said "telnet", but...) –  grawity Jul 28 '09 at 6:50
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.