1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to my-remote.ip [my-remote.ip] port 22.
debug1: Connection established.
debug1: identity file path_to_mykeypair.pem type -1
debug1: identity file path_to_mykeypair.pem-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3ubuntu6
debug1: match: OpenSSH_5.3p1 Debian-3ubuntu6 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA RSA::FINGERPRINT
debug1: Host 'my-remote.ip' is known and matches the RSA host key.
debug1: Found key in /home/surya/.ssh/known_hosts:5
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: [email protected]
debug1: Authentications that can continue: publickey
debug1: Trying private key: path_to_mykeypair.pem
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to my-remote.ip ([my-remote.ip]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LC_MESSAGES = en_IN.UTF-8
debug1: Sending env LANG = en_IN
debug1: Sending command: touch ~/foo
Using /home/ubuntu/.rvm/gems/ruby-1.8.7-p334
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2704, received 2040 bytes, in 1.4 seconds
Bytes per second: sent 1924.6, received 1452.0
debug1: Exit status 0

surya@ftw:~/$


and these are the directory permissions:


drwxr-xr-x   2 root root  4096 Jun 28  2011 bin
drwxr-xr-x   3 root root  4096 Jun  1  2011 boot
drwxr-xr-x  12 root root 13280 Mar 10 09:52 dev
drwxr-xr-x 110 root root  4096 Mar 20 19:24 etc
drwxr-xr-x   4 root root  4096 Mar 14 06:56 home
drwxr-xr-x  18 root root 12288 Jan  6 11:42 lib
drwx------   2 root root 16384 Jun  1  2011 lost+found
drwxr-xr-x   2 root root  4096 Jun  1  2011 media
drwxr-xr-x   3 root root  4096 Sep 23  2010 mnt
drwxr-xr-x   2 root root  4096 Jun  1  2011 opt
dr-xr-xr-x  89 root root     0 Mar 10 09:52 proc
drwx------   6 root root  4096 Mar 20 11:23 root
drwxr-xr-x   2 root root  4096 Jan  6 11:42 sbin
drwxr-xr-x   2 root root  4096 Dec  5  2009 selinux
drwxr-xr-x   3 root root  4096 Jul 16  2011 srv
drwxr-xr-x  13 root root     0 Mar 10 09:52 sys
drwxrwxrwt   6 root root  4096 Mar 21 06:17 tmp
drwxr-xr-x  11 root root  4096 Jun 28  2011 usr
drwxr-xr-x  15 root root  4096 Jun 28  2011 var

and in home:

drwxr-xr-x 18 ubuntu      ubuntu      4096 Mar 21 07:04 ubuntu

in ubuntu:

drwxrwxrwx 10 ubuntu ubuntu   4096 Mar 13 10:34 apps