I know this goes back a while... but I can't seem to find the "appropriate command line switch" on the SFTP command to point to the public key.
In my case, the key is in /home/biz/.ssh
If I log on as user "biz" I can establish a connection.
If I log on as another user, I cannot connect unless I CHGUSPRF USRPRF(me) HOMEDIR('/home/biz')
I'll be using this in batch... what am I missing?
sftp -h
usage: sftp [-46AaCfNpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
[-D sftp_server_path] [-F ssh_config] [-i identity_file]
[-J destination] [-l limit] [-o ssh_option] [-P port]
[-R num_requests] [-S program] [-s subsystem | sftp_server]
destination
TIA,
Greg
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jack Woehr via MIDRANGE-L
Sent: Thursday, December 21, 2023 7:21 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Jack Woehr <jwoehr@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: sFTP User Name - does it need to match user name on the server
When SFTPing to a remote system, all that matters is that you know an
account name at the remote end and you can either provide its password or
have a public key installed on the remote. It doesn't care who you are to
your local system.
The public key on the remote site must correspond to a private key found
either in the local user's ~/.ssh directory or pointed to by the
appropriate command line switch passed to the sftp command.
On Wed, Dec 20, 2023, 21:11 Don Brown via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:
I need to set up a sFTP file transfer.
I have been provided a user name and password, the user is admin
I used the ssh -T admin@<hostname> to add the site to the known hosts
file.
Does the user profile name on the IBMi need to be the same or can I use a
user name of SFTPUSER or something similar with a maximum length of 8
characters ?
As an example can I log in as SFTPUSER (or change the current active
profile to SFTPUSER) and then use sftp admin@<hostname>
I thought this was fine but I just can't find an explicit answer.
Thank you
Don
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Greg Wilburn
Director of IT
301.895.3792 ext. 1231
As an Amazon Associate we earn from qualifying purchases.