LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-16-2010, 01:42 PM   #1
Ihaveaquestionplz
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
I'm using Putty on Windows - How do I D/L and Edit a file from Linux Host?


It's as simple as that.

I can't use get or put commands from SSH on port 22 for some reason.

What's with that?? Anyway, after I log into my host as root, I want to be able to edit proftpd.conf . I want to download it to my windows PC, edit it from there, and put it back.

Please help.
 
Old 08-16-2010, 01:53 PM   #2
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 23
Go get winscp, that's an opensource sftp/scp windows program that uses port 22 ssh to xfer files back and forth. Looks just like any old ftp client. GET and PUT are ftp commands, when you ssh into your linux box, you're running a shell, not in an ftp session.

http://winscp.net/eng/index.php

edit - psftp is probably what you're wanting, not putty - it's an alternative that comes with putty if you download the whole suite.. pstfp, puttytel, puttyget, etc is all available at

http://www.chiark.greenend.org.uk/~s.../download.html

Last edited by suprstar; 08-16-2010 at 02:23 PM.
 
Old 08-16-2010, 02:41 PM   #3
Ihaveaquestionplz
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
thanks! one more question

one more question -

i used the "vi" command to edit the text file. However, I messed it up, and closed the SSH session without saving the file. When I brought up the "vi" command again to edit the file, it said the session was already open.

How do i close the previous session? When i used top, i don't see it.
 
Old 08-16-2010, 02:57 PM   #4
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 23
find the pid:

ps | grep vi

the kill the process:

kill -9 [pid]
 
Old 08-16-2010, 03:23 PM   #5
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
If your vi session dies during edit it will leave a hidden swap file with your changes.
It starts with a "dot" so it's hidden (i.e., .oldfile.txt.swp)
You will see the editor nag if this file exists next time you try to edit the file, you can use editor commands to recover or just delete the hidden file to keep the original.
 
Old 08-16-2010, 08:38 PM   #6
Ihaveaquestionplz
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
thank you so much !

you guys are lifesavers
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Map url adress to localhost (edit hosts file in windows, Linux eq) Geert86 Linux - Networking 1 02-03-2010 07:11 AM
if I edit the /etc/hosts file how to detect the new host without restarting the pc RMLinux Linux - Newbie 3 02-18-2009 06:27 PM
How to edit host file in Linux kbklinux Linux - Newbie 6 11-27-2008 10:41 AM
How to take printout of linux file from windows xp using putty? sathyguy Linux - Networking 6 02-20-2007 02:59 PM
Using PuTTY ... what are edit commands? jmueller0823 Linux - Networking 9 05-07-2003 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration