Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1283  / 2 Years ago, sun, december 12, 2021, 6:51:29

Hi I'm trying to connect to ftp using nautilus. But it doesn't accept the password.
An example how I tried to connect:



nautilus ftp://username:[email protected]



sftp also doesn't work. It treats the username and password as username. In the example is asks for a password for user username:PASSWORD



Am I doing something wrong? I found the syntax here


More From » nautilus

 Answers
1

Just store the password on the keyring. Then you won't be asked for a password again.



When prompted the first time, choose to store the password. You can't input the password to Nautilus from the command line.



A working alternative is gvfs-mount, which asks for the password on the terminal if not stored, instead of using a window.



gvfs-mount ftp://user@server && nautilus ftp://user@server


As the password is being read from the standard input, you can pass it from the command line like this:



gvfs-mount ftp://user@server <<< "passwordHere"
nautilus ftp://user@server


Please notice this is very insecure, since the password will be stored on your bash history file. I recommend disabling history before doing this, then reenable it.



HISTIGNORE="*"
gvfs-mount ftp://user@server <<< "passwordHere"
nautilus ftp://user@server &
unset HISTIGNORE


You can also finetune the HISTIGNORE expression, so it doesn't match any command starting with gvfs-mount and still keep other commands.



HISTIGNORE="gvfs-mount *"
gvfs-mount ftp://user@server <<< "passwordHere"
nautilus ftp://user@server &


You can write this a a one-liner also by using semicolons:



HISTIGNORE="gvfs-mount *"; gvfs-mount ftp://user@server <<< "passwordHere" ; nautilus ftp://user@server &


You can also avoid writing the URL twice by storing it on a variable:



CONNECT_TO="ftp://user@server" ; HISTIGNORE="gvfs-mount *"; gvfs-mount $CONNECT_TO <<< "passwordHere" ; nautilus $CONNECT_TO &

[#28710] Sunday, December 12, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eaderitable

Total Points: 368
Total Questions: 117
Total Answers: 111

Location: Tuvalu
Member since Sat, Feb 11, 2023
1 Year ago
;