From within telnet (putty), can I download a file to my computer?

1

1

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?

user3183

Posted 2009-07-27T23:51:31.050

Reputation: 3 059

1ssh 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.) – user1686 – 2009-07-28T06:52:19.917

Answers

4

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

Mark

Posted 2009-07-27T23:51:31.050

Reputation: 226

4

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

dlux

Posted 2009-07-27T23:51:31.050

Reputation: 4 183

1Aren't you a little young to know about zmodem, sonny? +1 for know a client that has it, though. – dmckee --- ex-moderator kitten – 2009-07-28T02:04:17.087

2Hey now...I've had to blow the dust of some X/ZMODEM once or twice in my career. ;-) – dlux – 2009-07-28T02:13:46.073

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 --- ex-moderator kitten – 2009-07-28T02:25:06.787

2Anytime 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 – 2009-07-28T03:22:50.027

2

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

jottos

Posted 2009-07-27T23:51:31.050

Reputation: 121

2

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.

mwalling

Posted 2009-07-27T23:51:31.050

Reputation: 478

1

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

Duck

Posted 2009-07-27T23:51:31.050

Reputation: 111

1

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.

dmckee --- ex-moderator kitten

Posted 2009-07-27T23:51:31.050

Reputation: 7 311

0

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.

Chris W. Rea

Posted 2009-07-27T23:51:31.050

Reputation: 10 282

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 – 2009-07-28T02:58:50.430

0

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)

dbr

Posted 2009-07-27T23:51:31.050

Reputation: 4 987

-2

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.

lumpynose

Posted 2009-07-27T23:51:31.050

Reputation: 111

1...dude, how exactly is PuTTY 30-year-old? (I'd understand if you said "telnet", but...) – user1686 – 2009-07-28T06:50:33.553