Edit Remote EC2 Text Files with TextWrangler
This post explains how to use TextWrangler on a Mac to edit text files that live on a remote Amazon EC2 instance with Ubuntu.
I assume you already know how to SSH to Amazon using an Identity File:
You can use a similar command to connect to your EC2 instance via SFTP:
TextWrangler allows you to open a file from an SFTP server, but it doesn't allow you to configure an Identity File as you did when SSHing or SFTPing from the command line. To work around this limitation, you simply have to configure your SSH client so that it knows the Identity File you want to use. Create ~/.ssh/config if it doesn't already exist and add a line specifying your Identity File location:
Now you're ready to use TextWrangler to connect to your server and browse files. Choose: File -> Open from FTP/SFTP Server... Then enter your server publisher DNS name, check the SFTP box and enter ubuntu as the User name. You can leave the Password: field blank.
After you hit connect, you TextWrangler will allow you to browse the file system of your EC2 instance, choose a file, and edit it. When you save the file, it will update directly on the remote EC2 instance. That's all there is to it!
I assume you already know how to SSH to Amazon using an Identity File:
ssh -i ~ec2-keys/id_your-keypair ubuntu@ec2-public-dns-name.amazonaws.com
You can use a similar command to connect to your EC2 instance via SFTP:
sftp -o IdentityFile=eec2-keys/id_your-keypair ubuntu@ec2-public-dns-name.amazonaws.com
TextWrangler allows you to open a file from an SFTP server, but it doesn't allow you to configure an Identity File as you did when SSHing or SFTPing from the command line. To work around this limitation, you simply have to configure your SSH client so that it knows the Identity File you want to use. Create ~/.ssh/config if it doesn't already exist and add a line specifying your Identity File location:
echo 'IdentityFile ~ec2-keys/id_your-keypair' >> ~/.ssh/config
Now you're ready to use TextWrangler to connect to your server and browse files. Choose: File -> Open from FTP/SFTP Server... Then enter your server publisher DNS name, check the SFTP box and enter ubuntu as the User name. You can leave the Password: field blank.
After you hit connect, you TextWrangler will allow you to browse the file system of your EC2 instance, choose a file, and edit it. When you save the file, it will update directly on the remote EC2 instance. That's all there is to it!
'Web Service > AWS' 카테고리의 다른 글
Sending Email from EC2 Instances (0) | 2012.07.27 |
---|---|
Ubuntu에 postfix 설정하기 (0) | 2012.07.19 |
[Mysql] 외부에서 mysql에 접근할 권한 주는 명령어 (0) | 2012.07.17 |
AWS EBS 볼륨 추가/삭제 시 참고 (0) | 2012.07.16 |
Filezilla로 .pem 파일을 활용하여 로그인하기 (0) | 2012.06.12 |