[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ssh_get_user_home_dir (misc.c)


Hi,

Please be careful with the layout of your email, the last one was very
hard to read.
The folders are not expected to contain anything, but at least
ssh_is_server_known() will report an error if the known hosts file is
missing. ssh_write_knownhosts() will create the file if it doesn't exist.

In case you are writing a system app, you can safely set the home
directory to a directory like /var/empty and control the known_hosts
file location with ssh_options_set.

Aris

Le 20/04/14 20:18, Zvi Vered a écrit :
> Hello,
>  
> Let’s assume I’m setting the folder name using “ssh_options_set”.
> Then I’m calling to ssh_connect.
>  
> Should this folder contain any files before the first connection ?
>  
> Thank you in advance for your help,
> Zvika
>  
> -----Original Message-----
> From: Aris Adamantiadis
> Sent: Sunday, April 20, 2014 10:52 AM
> To: libssh@xxxxxxxxxx
> Subject: Re: ssh_get_user_home_dir (misc.c)
>  
> Hi,
>  
> This is used in two cases: as a fallback when the username to remotely
> log on is unknown and to find the home directory of the local user, to
> parse his configuration file, private keys and known_hosts file.
> You can avoid this by setting the userdirectory parameter with
> ssh_options_set.
>  
> Aris
> Le 20/04/14 03:54, Zvi Vered a écrit :
> > Hello,
> > Upon calling to: ssh_connect the routine: ssh_get_user_home_dir is
> called.
> > Why upon connection to remote SSH server, the client has to know its
> > own user name ?
> > I’m porting the libssh library to vxWorks 6.x in kernel mode.
> > In this mode, there is no “account” or “user name”.
> > Thanks,
> > Zvika
>  
>  


References:
ssh_get_user_home_dir (misc.c)"Zvi Vered" <veredz72@xxxxxxxxx>
Re: ssh_get_user_home_dir (misc.c)Aris Adamantiadis <aris@xxxxxxxxxxxx>
Re: ssh_get_user_home_dir (misc.c)"Zvi Vered" <veredz72@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org