SFTP/Shell Access Issues


#1

I have setup the proper requests in the User management panel to allow shell and SFTP access, and no FTP access.

I think it is right since I am able to login using a SFTP program, Transmit. However I am not able to do a ssh user@mydomain.com as it “Permission denied”'s me every time. So thinking it is time to check the /var/log syslog I find that I am not allowed to do anything with this file.

Two problems:

  1. What is wrong with my ssh from my local system shell command?
  2. How do I get the right permissions set on my log files so that I can copy/view them?

Thanks.[hr]

Uh yeah, I forgot what I was dealing with. :slight_smile: Set my directory correctly to my user directory and I am able to deal with the files for my hosted domain.

Will I be able to do a ssh user@mydomain.com or not?


#2

That’s the same setup I have (Transmit and SSH access w/no FTP).

Make sure that your User is set up as a Shell Account (the third option) that allows SFTP and FTP. Then disallow FTP.

  1. Nothing’s wrong with your SSH command.
  2. You can’t view the system logfiles, as it’s a shared system.

Try ssh -v user@example.com
Then sift through the debug messages to see what the hangup is. If you’re still stuck, PM me the debug messages and I’ll look for hints.


#3

Thanks Scott. I am looking at the verbose output and it looks OK to me but for some reason it does not think I know what my password is? If the password I think it is works with Transmit then it should work from the command line? Confused.

Here is the output (edited to remove identifiables…)

ssh -v xxx@xxx.comOpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to xxx.com [67.205.45.186] port 22.
debug1: Connection established.
debug1: identity file /Users/xxx/.ssh/identity type -1
debug1: identity file /Users/xxx/.ssh/id_rsa type -1
debug1: identity file /Users/xxx/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5
debug1: match: OpenSSH_5.1p1 Debian-5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
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: Host ‘xxx.com’ is known and matches the RSA host key.
debug1: Found key in /Users/xxx/.ssh/known_hosts:16
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/xxx/.ssh/identity
debug1: Trying private key: /Users/xxx/.ssh/id_rsa
debug1: Trying private key: /Users/xxx/.ssh/id_dsa
debug1: Next authentication method: password
xxx@xxx.com’s password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
xxx@xxx.com’s password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
xxx@xxx.com’s password:
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).[hr]

I think I am getting closer to figuring this out. Since I use a Mac I went to the keychain app and looked at what Transmit is using for a SFTP password.

It was NOT what I thought it was…duhhhh. Using the correct password I was able to ssh as expected.

Sorry for the bother. :-0


#4

Cool. No bother. I’m glad it was a straightforward fix.