fix: set a root for the ssh verification.
This commit is contained in:
parent
82d7ca48bb
commit
8bec5e87b5
3 changed files with 9 additions and 2 deletions
|
@ -458,9 +458,10 @@ pub mod ssh {
|
|||
return Ok(json!({"result": "error", "error": "Skynet email not permitted."}).into());
|
||||
}
|
||||
|
||||
let config = &req.state().config;
|
||||
|
||||
// check if <root>/<user>/.ssh/authorized_keys exists
|
||||
//let root = "/skynet_old";
|
||||
let root = ".";
|
||||
let root = &config.ssh_root;
|
||||
let path = format!("{}/{}/.ssh/authorized_keys", root, user);
|
||||
let mut keys = vec![];
|
||||
if fs::read_to_string(&path).is_ok() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue